javascript - Ajax: injecting code into Internet Explorer -


I'm having trouble getting a follow-up code to work in Internet Explorer, it does not seem that executing code To be sent back to the server via Ajax, it is nothing:

  var ajax = new ActiveXObject ('Microsoft.XMLHTTP'); Ajax.open ('receive', 'http: //fromsitewebsite.com/javascript.js',true); Ajax.setRequestHeader ('connection', 'pass'); Ajax.onreadystatechange = function () {if (ajax.readystate == 4) {document.body.inner HTML + = '& lt; Script type = "text / javascript" & gt; + Ajax.responsetext + '& lt; / Script & gt; ' ; }}; Ajax.send ('');  

I have still tried to do this with no luck;

  document.body.innerHTML + = '& lt; Script type = "text / javascript" & gt; ('+ Ajax.responsetext +') () & lt; / Script & gt;  

Cheers

> .text value.

  var scrElem = document.createElement ('script'); ScrElem.type = 'text / javascript'; ScrElem.text = ajax.responseText; Document.body.appendChild (scrElem);  

Comments

Popular posts from this blog

asp.net - Javascript/DOM Why is does my form not support submit()? -

sockets - Delphi: TTcpServer, connection reset when reading -

javascript - Classic ASP "ExecuteGlobal" statement acting differently on two servers -