Hi Stephan,
sg****@gmail.com wrote:
I have create a AJAX webpage where if you press a link content is
loaded into a div. NOw when this content is loaded no javascript is
processed (i.e <Script>alert(..);</script>), but if the javascript is
in <a onclick="..."> it will work.
What i would like to know is:
- Is this normal
- What do i need to change so that javascript does get processed?
Yes it seems to be normal that the javascript in script tags isn't
processed. The javascript in the onclick gets processed when the click
occurs, or so it seems.
Yesterday I went through this very same thing and asked about it here.
The thread was called "run JavaScript that is part of AJAX response".
Lasse gave me some great advice about how to deal with this in my
situation.
http://groups.google.com/group/comp....9890b18d005e9e
It is interesting to note that the Prototype.js Ajax.Updater() function
seems to automatically run the javascript when it inserts the AJAX
response. This is why I've temporarily reverted to using the
Prototype.js library for AJAX until I can try writing some higher level
functions for the Yahoo! UI connection library.
Peter