Hi,

> I am trying use Ajax.Updater which gives me back a html and the html
> refers to a javascript in a different file.
> Would a dom:loaded event in the javascript be executed..?

No. Ajax.Updater uses Element#update to do the update; Element#update
uses String#evalScripts to handle script tags, which doesn't support
script tags referencing external files:
http://api.prototypejs.org/language/string.html#evalscripts-instance_method

You can load them yourself by finding the script tags and using the
techniques here:
http://proto-scripty.wikidot.com/prototype:how-to-load-scripts-dynamically

HTH,
--
T.J. Crowder
Independent Software Consultant
tj / crowder software / com
www.crowdersoftware.com


On Feb 12, 8:14 am, Hari <[email protected]> wrote:
> I am trying use Ajax.Updater which gives me back a html and the html
> refers to a javascript in a different file.
> Would a dom:loaded event in the javascript be executed..?
>
> For eg:
>
> my resopnse:
>
> <html>
> <script src="abc.js"/>
> <body>
> ....
> </html>
>
> and my abc.js has
>
> Event.observer("dom:loaded", doSomething);
>
> Would the function doSomething() function be called....

-- 
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