AJAX RESPONSE

Discussion in 'Javascript' started by GSlusarek@gmail.com, May 23, 2006.

Guest

Hi all. I made AJAX call which return me a piece of javascript code. I
trying to execute that code and I get that some global variables are
not accesible. I mean i use prototype library and when i get ajax
response I can't execute code that create next Ajax call.
e.g.
new Ajax.Updater(....)
is name error, can't find name Ajax.
What I'm doing wrong?
Greg

Advertisements

wrote:
> Hi all. I made AJAX call which return me a piece of javascript code. I
> trying to execute that code and I get that some global variables are
> not accesible. I mean i use prototype library and when i get ajax
> response I can't execute code that create next Ajax call.
> e.g.
> new Ajax.Updater(....)
> is name error, can't find name Ajax.
> What I'm doing wrong?
> Greg

Hi,

The content of the response may have javascript in it, but this is NOT
executed as you would expect in a normal html-page if you just replace some
innerHTML of a div with it.

You need something with CTYPE and a few tricks to use the AJAX-delivered
javascript. (I am unsure how it worked, since my CSS/XML-skills suck.)

Google around a bit.
(I tried, but couldn't find the page I was looking for.)

If you find a nice tutorial on the subject, post it in this thread please
for futher reference.

Share This Page

Welcome to The Coding Forums!

Welcome to the Coding Forums, the place to chat about anything related to programming and coding languages.

Please join our friendly community by clicking the button below - it only takes a few seconds and is totally free. You'll be able to ask questions about coding or chat with the community and help others.
Sign up now!