Sorry for my ignoreance I''m kind of new to this.... I have a requirement for a page that essentially consists of three "DIVS". DIV1 - This is static, it has a bunch of links that initiate a AJAX request to populate DIV2 DIV2 - Populated as a result of a request initiated from DIV1. - This needs to have further links that will initiate a AJAX request to populate DIV3. Can the response include further Javascript to allow more dynamic behaviour ? DIV3 - Populated as a result of a request initiated from DIV2. Does anyone know of any tutorials available in this area ?. Thanks to all.... --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
Hey there, It doesn''t really require a specific tutorial. Just look at simple use cases for Ajax.Updater, you''ll have everything you need. Of course the XHTML fragment you get back from your first, DIV1-triggered calls to Ajax.Updater can contain <script> elements. Those will even get stripped out of the inserted DOM fragment, and executed right after DOM insertion. These could very well bind the new links to further calls to Ajax.Updater, this time targetting ''DIV3''. If your function code for the DIV2 links is the same all the time (only parameters vary), you may want to put it in a separate script file, include it statically in your global page, and just provide event binding code with your returned XHTML fragments. That''ll help factor stuff out and reduce the complexity of these results. -- Christophe Porteneuve aka TDD tdd-x+CfDp/qHev2eFz/2MeuCQ@public.gmane.org --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
Thanks - that works for me. I was unclear how any <script> tags would be handled, but you''ve answered that for me. Richard On Jan 26, 5:16 pm, Christophe Porteneuve <t...-x+CfDp/qHev2eFz/2MeuCQ@public.gmane.org> wrote:> Hey there, > > It doesn''t really require a specific tutorial. Just look at simple use > cases for Ajax.Updater, you''ll have everything you need. > > Of course the XHTML fragment you get back from your first, > DIV1-triggered calls to Ajax.Updater can contain <script> elements. > Those will even get stripped out of the inserted DOM fragment, and > executed right after DOM insertion. These could very well bind the new > links to further calls to Ajax.Updater, this time targetting ''DIV3''. > > If your function code for the DIV2 links is the same all the time (only > parameters vary), you may want to put it in a separate script file, > include it statically in your global page, and just provide event > binding code with your returned XHTML fragments. That''ll help factor > stuff out and reduce the complexity of these results. > > -- > Christophe Porteneuve aka TDD > t...-x+CfDp/qHev2eFz/2MeuCQ@public.gmane.org--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
Hey there, bbbs a écrit :> Thanks - that works for me. > I was unclear how any <script> tags would be handled, but you''ve > answered that for me.Actually, I wasn''t quite right (tired here, sorry): http://prototypejs.org/api/ajax/updater By default, <script> tags are stripped out, and not evaluated. If you specify the evalScripts option to true, they''re left in, and their insertion in the DOM will automatically evaluate them. -- Christophe Porteneuve aka TDD tdd-x+CfDp/qHev2eFz/2MeuCQ@public.gmane.org --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---