Hi,

How 'bout a NON-pseudo, standalone example?  Because there are a
number of things in that pseudo that could be tripping you up, but I
figure most of them are because it's pseudo...
--
T.J. Crowder
tj / crowder software / com
Independent Software Engineer, consulting services available


On Aug 18, 4:49 pm, dweeves <dwee...@gmail.com> wrote:
> Hi , i'm using Ajax.Updater in a "nested" way.
>
> here is a pseudo-code of my use case
>
> First pass
>
> <main_div>
>   <a onclick="updateDivWithAjaxUpdater(sub_div)">load subdiv</a>
>   <sub_div>
>   </subdiv>
> </main_div>
>
> Second pass, sub_div is filled with something like that
> <a onclick="updateDivWithAjaxUpdater(sub_sub_div)>load sub sub div</a>
> <sub_sub_div>
>   some content
> </sub_sub_div>
>
> so after second pass, my DOM looks like:
>
> <main_div>
>   <a onclick="updateDiv(sub_div)">load subdiv</a>
>   <sub_div>
>     <a onclick="updateDiv(sub_sub_div)>load sub sub div</a>
>     <sub_sub_div>
>        some content
>     </sub_sub_div>
>   </subdiv>
> </main_div>
>
> The problem arise while trying to update sub_sub_div (or access
> sub_sub_div content in javascript (using $(sub_sub_div).update or
> innerHTML through DOM)
>
> The requests is sent, the response returns a valid new content but:
>
> sub_sub_div content is never refreshed !!!!
>
> Can you tell me what happens ?
>
> here is the code of my updateDiv function
>
> updateDiv=function(targetDiv,url,params,completecb,async,method)
> {
>         var ctrl=$(targetDiv);
>         if(async)
>         {
>                 ctrl.update('Loading...');
>         };
>         //method=method||"get";
>
>         new Ajax.Updater(targetDiv,url,
>                           {
>                                 asynchronous:(async!=null),
>                                 onComplete:completecb,
>                               evalScripts:true,
>                                 postBody:params
>                           }
>         );
>
>
>
> };
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Prototype & script.aculo.us" group.
To post to this group, send email to prototype-scriptaculous@googlegroups.com
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to