Hi, I''m using prototypejs Updater function in order to load a particular div section content without loading the whole page. The problem is that any content in this div section that uses javascript functions doesnt work, for instance image galleries that use "lightbox" display types appear in a classic way when you click on an image, also Flash video that use the FLV player doesnt show. Please help. My website is http://www.avastarweb.com Thanks --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Hi cnickel, if i have inderstood you, i think that something similar happened to me and i had to use another approach: inserting into the div a reference to a javascript file in this way: var d = document.getElementById(''some_node''); var script = document.createElement(''SCRIPT''); script.type = ''text/javascript''; script.src = ''js/my_javascript.js''; d.appendChild(script); and then inserting the html using the innerHTML property. Of course, your javascript code should be included in the file "my_javascript.js" regards, Fernando Usero On May 24, 2:07 pm, cnickel <christophe.grosnic...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Hi, > I''m using prototypejs Updater function in order to load a particular > div section content without loading the whole page. > The problem is that any content in this div section that uses > javascript functions doesnt work, for instance image galleries that > use "lightbox" display types appear in a classic way when you click on > an image, also Flash video that use the FLV player doesnt show. > > Please help. My website ishttp://www.avastarweb.com > Thanks--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Frederick Polgardy
2008-May-24 18:43 UTC
Re: Javascript doesnt work in Updater div sections
Are you passing evalScripts: true as an option to Ajax.Updater? new Ajax.Updater(''someDiv'', ''someUrl'', { evalScripts: true, ... }); By default, scripts that are returned from an Ajax call via Ajax.Updater are stripped and not evaluated. -Fred On Sat, May 24, 2008 at 7:07 AM, cnickel <christophe.grosnickel-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > Hi, > I''m using prototypejs Updater function in order to load a particular > div section content without loading the whole page. > The problem is that any content in this div section that uses > javascript functions doesnt work, for instance image galleries that > use "lightbox" display types appear in a classic way when you click on > an image, also Flash video that use the FLV player doesnt show.-- Science answers questions; philosophy questions answers. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---