imgrooot Posted June 28, 2016 Share Posted June 28, 2016 Question 1. I have a form and on submit it redirects to another site. Is it possible to open that site in a new tab instead of the same page? I have tried this js code and it doesn't seem to work. if() { $get_url = 'https://www.google.ca/'; ?> <script> window.open('<?php echo $get_url; ?>','_blank'); </script> <?php } Question 2. Is it possible to have a extend popup to another site using a unique link? Take the above google link for example. Is it possible to add new code at the end of that link url which will show a popup window or something on that google page if only visited through that link? Quote Link to comment Share on other sites More sharing options...
gizmola Posted June 28, 2016 Share Posted June 28, 2016 These questions have nothing to do with php do they? I'm moving your question to the javascript subboard. As far as opening a new window vs. a tab. that is behavior that is controlled by the browser, but essentially, you are using the correct technique, in specifying that the target be "_blank". Use firebug or some similar browser javascript debugger to see what is going wrong. I'm not really sure what you are trying to do with Question 2. Please elaborate with an example. Quote Link to comment Share on other sites More sharing options...
Solution requinix Posted June 28, 2016 Solution Share Posted June 28, 2016 I think Groot is trying to say he wants to make the page on the other site do something, such as open a popup window upon arrival. If that's the case then no, it is not possible. You cannot make someone else's site do something it wasn't designed to do. Quote Link to comment Share on other sites More sharing options...
imgrooot Posted June 28, 2016 Author Share Posted June 28, 2016 I think Groot is trying to say he wants to make the page on the other site do something, such as open a popup window upon arrival. If that's the case then no, it is not possible. You cannot make someone else's site do something it wasn't designed to do. Yes that's exactly what I was asking. I now understand that is not possible. Quote Link to comment 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.