AJAX RESPONSE

G

GSlusarek

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
 
E

Erwin Moller

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. :)

Regards,
Erwin Moller
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,764
Messages
2,569,564
Members
45,039
Latest member
CasimiraVa

Latest Threads

Top