You're looking for the evalScripts option of Ajax.Updater[1], which in
turn uses Element#update[2] to update the target container, which in
turn (!) uses String#evalScripts[3] to eval the scripts.  Scripts must
be inline in script tags, they cannot have src attributes loading
external scripts.  If you want to do that, there's an article[4] on
the unofficial wiki that talks about how to do that.

[1] http://prototypejs.org/api/ajax/updater
[2] http://prototypejs.org/api/element/update
[3] http://prototypejs.org/api/string/evalScripts
[4] http://proto-scripty.wikidot.com/prototype:how-to-load-scripts-dynamically

FWIW, I suggest giving the API a good front-to-back read.  Takes about
an hour, and will save you lots of time and trouble in the long run.

T.J. Crowder
tj / crowder software / com
Independent Software Engineer, consulting services available

On Jul 30, 3:31 pm, DJJQ <joll...@hotmail.com> wrote:
> Hello.
> I use the Updater function to load a div on the page with contents
> from a php file. The load works just fine, however in the browser I
> have noticed that new javascript written in the new php isn't
> recognized.
> However javascript code from the original page is recognized in the
> new div.
> I understand that perhaps the ordinary script tagging in the head of
> the new document doesn't work. Well is there any prototype function to
> load the javascript codes?
> Best Regards, Joel H.
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 prototype-scriptaculous@googlegroups.com
To unsubscribe from this group, send email to 
For more options, visit this group at 

Reply via email to