Problem with Javascript in IE, fine in Firefox

JavaScript and client side scripting.

Moderator: General Moderators

Post Reply
rich86
Forum Newbie
Posts: 15
Joined: Sun Jun 11, 2006 7:30 pm

Problem with Javascript in IE, fine in Firefox

Post 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
User avatar
Burrito
Spockulator
Posts: 4715
Joined: Wed Feb 04, 2004 8:15 pm
Location: Eden, Utah

Post by Burrito »

moved to client side.
Post Reply