sandy1028 Posted October 16, 2007 Share Posted October 16, 2007 Hi, I get the message as The web page you are viewing is trying to close the window.Do you want to close this window? when new window opens. How to avoid this message. Quote Link to comment https://forums.phpfreaks.com/topic/73451-web-page-opens-in-new-window/ Share on other sites More sharing options...
mrsquash Posted October 16, 2007 Share Posted October 16, 2007 post your code so we can see what you are doing. Quote Link to comment https://forums.phpfreaks.com/topic/73451-web-page-opens-in-new-window/#findComment-370612 Share on other sites More sharing options...
sandy1028 Posted October 18, 2007 Author Share Posted October 18, 2007 Hi, From the test.php file parameter is passed to file.php as the target=_blank. But when the file.php opens I get the message as The web page is trying to close echo "<script language ='Javascript'>"; echo " window.resizeTo(screen.width,screen.height);"; echo "</script>"; echo "</head>"; echo "<body onload=\"window.close();\" leftMargin=0 topMargin=0>"; Quote Link to comment https://forums.phpfreaks.com/topic/73451-web-page-opens-in-new-window/#findComment-372155 Share on other sites More sharing options...
fenway Posted October 19, 2007 Share Posted October 19, 2007 That's PHP code... not JS code. Why would you close a window when you open it? Quote Link to comment https://forums.phpfreaks.com/topic/73451-web-page-opens-in-new-window/#findComment-373231 Share on other sites More sharing options...
sandy1028 Posted October 22, 2007 Author Share Posted October 22, 2007 The prompt appears still I remove the window.close(). Quote Link to comment https://forums.phpfreaks.com/topic/73451-web-page-opens-in-new-window/#findComment-375297 Share on other sites More sharing options...
fenway Posted October 22, 2007 Share Posted October 22, 2007 That's hard to belive. Quote Link to comment https://forums.phpfreaks.com/topic/73451-web-page-opens-in-new-window/#findComment-375674 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.