Hi ,

many thanks for your comment!!!

i was thinking the problem was in the structure of the code, by trying
to send you the "real" thing, i just figured out
that somewhere in the page, there was already a div that had same id
than the one in the updated content.

Fixing ids solved the problem.

Kind Regards.

S.BRACQUEMONT




On 18 août, 23:16, "T.J. Crowder" <[email protected]> wrote:
> 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 <[email protected]> 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 [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to