Getting Access Denied error in IE 6 browser when using window.open

  • Thread starter Jeyaprakash(CK) Chittu
  • Start date
J

Jeyaprakash(CK) Chittu

The following code gives me a Access Denied error in IE6. It looks like
this problem was there before in the earlier versions of IE browser liek
4.0 etc. Even delaying does not seem to help

<script>
var dlg = window.open("", "_blank");
dlg.focus();
var doc = dlg.document;
doc.open("text/html");
doc.writeln ("<html><body>Hello world</body></html>");
</script>

I tried this workaround also but it still gives me Access Denied error

<script>
var dlg = window.open("myblank.htm", "_blank");
dlg.focus();

function updatePage() {
var doc = dlg.document;
doc.open("text/html");
doc.writeln ("<html><body>Hello world</body></html>");
}
</script>

In myblank.htm i put a onload script to call opener.updatePage() even
then i get access denied error at line var doc = dlg.document.

Any ideas and clues

Thanks
CK
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,534
Members
45,008
Latest member
Rahul737

Latest Threads

Top