I\'m trying to get a page with AJAX, but when I get that page and it includes Javascript code - it doesn\'t execute it.
Why?
Simple code in my ajax page:
Use this function:
function parseScript(_source) {
var source = _source;
var scripts = new Array();
// Strip out tags
while(source.indexOf(" -1) {
var s = source.indexOf("", e);
// Add to scripts array
scripts.push(source.substring(s_e+1, e));
// Strip from source
source = source.substring(0, s) + source.substring(e_e+1);
}
// Loop through every script collected and eval it
for(var i=0; i
then do parseScript(xmlhttp.responseText); when you're replacing/adding content.