bm4499 Posted January 16, 2011 Share Posted January 16, 2011 Hi, is it possible to use the code below and open it into a new internetexplorer window? The code works properly except I want it as pop-up window. header("Location: http://192.168.10.254/img/Calcday.php?p=$val"); thanks a lot in advance. Quote Link to comment https://forums.phpfreaks.com/topic/224615-header-pop-up/ Share on other sites More sharing options...
JKG Posted January 16, 2011 Share Posted January 16, 2011 No can do, its not serverside, it cannot control the browser. Use Javascript or HTML. i would suggest a meta refresh or a little js wrapped in and if statement... <?php if($variable==true) { ?> <script> window.open("www.google.co.uk"); </script> <?php } ?> or <meta http-equiv="refresh" content="1;URL=http://google.co.uk" target="_blank"> Quote Link to comment https://forums.phpfreaks.com/topic/224615-header-pop-up/#findComment-1160332 Share on other sites More sharing options...
bm4499 Posted January 16, 2011 Author Share Posted January 16, 2011 thanks a lot, now it works. Thought there was a possible parameter since it was working in same window. Same window means serverside.... Got it now. Once again, thanks a lot. Quote Link to comment https://forums.phpfreaks.com/topic/224615-header-pop-up/#findComment-1160345 Share on other sites More sharing options...
dragon_sa Posted January 17, 2011 Share Posted January 17, 2011 Just to clarify same window does not mean server side, serverside means that the script is processed on the hosting server and then passed to the users browser as html, php does this, clientside means that the script is processed on the clients machine and modifies the contents of the users web browser, javascript does this. The reason you couldnt do what you wanted with php is because php has no actual communication with the users web browser as it has finished its job before it gets there, and thus we use scripts like javascript to perform any actions we need on the users web browser, such as onclick events, onmouse over events, pop ups etc etc Quote Link to comment https://forums.phpfreaks.com/topic/224615-header-pop-up/#findComment-1160571 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.