hi there,

well, i trigger the ajax request much like this:  no matter what they
role is, all my interface buttons finish by an action called
UI.refresh({section:'projects', sortby:'time', item:'love-me'});

this function compares the sent properties to the current UI stored
properties, and if there is a change, trigger specific actions. That
UI.refresh() function is therefore structured like this:

ui.refresh:function(Obj){

// 1. compare the 2 objects: current UI and Obj. If changes, update UI

if(Obj.section && Obj.section!== UI.section){
queueArray.push('section');
UI.section= Obj.section;
}
// same for all properties


2. loop through the queueArray and make necessary UI changes

 for (i = 0; i < queueArray.length; i++)
        {
            switch (queueArray[i])
            {
                case 'section':

                    // Animating the strata
                    var $thisLI = $('#' + UI.section);
                    $thisLI.strataToCenter();
$('#leftcol').load(UI.CURRENT_URL);

                    break;
case 'item':
//do this and that...
$('#projectNav').load('thatpage');
break;
}
}

}


it may seems like overwork to you guys, but my app is quite big and
this structure helps me keep the code well structured.

Thanks for taking the time to help me...


On Fri, Mar 6, 2009 at 4:16 PM, ryan.j <ryan.joyce...@googlemail.com> wrote:
>
> that crossed my mind, but from the comments above i think he he wants
> multiple content boxes being populated from a number of different
> triggers, although he's using an id (of which he can only have one
> instance of anyway) as the identifier for the loading icon.
>
> i'm not sure this is the best way of doing it, cos unless i'm
> misunderstanding quite what he wants to do he'll only be able to
> process one ajax request at a time doing it like this.
>
> Alexandre, how are you triggering the ajax request?

Reply via email to