joho
2007-Jun-27 11:59 UTC
Prototype 151; Ajax.Updater vs Ajax.Request and evalScripts=true
Why does Ajax.Updater() and Ajax.Request() differ in how evalScripts is handled? Or doesn''t it, and I just got it wrong? I have a module that generates an Ajax request to insert dynamic content into a div. The dynamic content is plain vanilla HTML with some inline javascript *functions* I cannot get the browser to honor/execute/see those javascript functions when I use .Request() If I use .Updater(), however, it works fine (provided I''ve enabled evalScripts) Is there a reference somewhere that explains why? -joho --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Christophe Porteneuve
2007-Jun-27 12:04 UTC
Re: Prototype 151; Ajax.Updater vs Ajax.Request and evalScripts=true
Hey, joho a écrit :> Why does Ajax.Updater() and Ajax.Request() differ in how evalScripts > is handled? Or doesn''t it, and I just got it wrong?Perhaps because, as the docs state clearly, evalScripts is NOT an A.R option? It is introduced in A.U.> I cannot get the browser to honor/execute/see those javascript > functions when I use .Request()Indeed. That''s nominal. Also, since you''re trying to inject a response in the DOM, there''s no reason why you should use A.R instead of A.U, which is specifically targeted at that job.> Is there a reference somewhere that explains why?The official site does so aplenty, both in the API docs and the tutorials: http://prototypejs.org/ -- 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 -~----------~----~----~----~------~----~------~--~---
Possibly Parallel Threads
- Ajax.Updater with evalScripts: true strips curly braces
- js not executed after ajax.updater -- evalScript:true not a solution
- Ajax.Updater evalScripts:true
- prototype ajax.updater response bigger than 10k on safari
- problem with Ajax.Updater evalscript and firefox