Jump to content

Is it possible to do these things?


imgrooot
Go to solution Solved by requinix,

Recommended Posts

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?

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

  • Solution

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.