Click here to Skip to main content
15,891,828 members

Comments by Member 10292007 (Top 1 by date)

Member 10292007 7-Jul-14 18:09pm View    
Hi Sergey

Thanks for the reply and for taking so long to reply.
I managed to solve it in simple HTML, but the weird thing is that some parts work in IE and other work in chrome:

open.html
<body>
<input type="text" önclick="alert('text'); winopen();"></input>

<script>
function winopen()
{
var ghtml = "

sasaasas

";
var gwin = window.open("", "_blank", "location=no,width=1000,height=600");
if (gwin)
{ gwin.document.open();
gwin.document.write(ghtml);

var oscript = gwin.document.createElement("script");
oscript.type = "text/javascript";
oscript.src = "open.js";
//oscript.onload = function() { init(); };
gwin.document.getElementsByTagName("head")[0].appendChild(oscript);

//gwin.document.close();
}
}
winopen(); // works in IE11, not chrome
</script>
</body>


open.js
function init() { alert("winwin"); }
setTimeout(function() { init(); }, 2000); // work in chrome, not IE11