What version of Prototype are you looking at? The version I have
(Prototype 1.5.1) has this:
On line 1172 inside the initialize method of the Ajax.Updater class it
sets the options through Object.extend() on a set of defaults:
1172 this.setOptions(options);
The defaults are:
980 setOptions: function(options) {
981 this.options = {
982 method: 'post',
983 asynchronous: true,
984 contentType: 'application/x-www-form-urlencoded',
985 encoding: 'UTF-8',
986 parameters: ''
987 }
Then, back in Ajax.Updater inside the updateContent method (that is
being called when the request is over) we see this on line 1187:
1187 if (!this.options.evalScripts) response = response.stripScripts();
So it this.options.evalScripts is false (which it is as it's not set)
the response is set to the response without the scripts. Therefor,
when Element.update() is called on the response text, it is without
the script tags and then does not ever call evalScripts() on that
stripped javascript.
Bam!
Is that not the case for you? What version are you using?
-E
On 5/23/07, tobie <[EMAIL PROTECTED]> wrote:
>
> > You need to pass "evalScripts: true" in the options to Ajax.Updater...!
>
> Nope, that's the default setting.
>
>
> >
>
--
Eric Ryan Harrison
--~--~---------~--~----~------------~-------~--~----~
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 [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---