Page 1 of 1

Problem with Javascript in IE, fine in Firefox

Posted: Mon Nov 20, 2006 10:56 am
by rich86
Hi i am trying to run this javascript code:

Code: Select all

var head = document.getElementById("tophead");
   script = document.createElement('script');
   script.setAttribute('type','text/javascript');
   var thescript = http_request.responseText;
   var scriptnode = document.createTextNode(thescript);
//alert(thescript);//gets this far
   script.appendChild(scriptnode);
//alert("hello");//this alert not seen
   head.appendChild(script);
   return add_markers();

it loads using AJAX and is suppose to insert a script page and then run it!

it works fine in firefox and netscape and opera, just IE it doesn't run, using the alerts i know it gets as far as the first alert but the second one does not come up. Any suggestions or do you need more of the code?

Many thanks

Posted: Mon Nov 20, 2006 1:15 pm
by Burrito
moved to client side.