can i run a java script in ajax? I’ve tried to embed some java script on the php that was triggered by an ajax command, the script is intended to change html attribute in the parent page. it doesn’t work, when i look at the console in firebug it only print the script and doesn’t even make an alert.
tnx so much for the rplies.
You need to evaluate the response text.
E.G. returning
alert('foobar')in the ajax, you can then doeval(ajaxResponseText).using a library like Prototype.js you can tell it to automatically evaluate script tags within the response text.