Jump to content

open results page in new window


mglover88

Recommended Posts

Hi,

 

I was just wondering if it were possible (and if so how) to open a page in a new window when submitting a form via php? E.g. I have a poll on my website that is directed to the reults page by $insertGoTo = "results.php";. This all works but what I want to happen is for when the user clicks submit that the results page displays in a new window (or at the very least a new tab), similar to what would happen when you put a target=_blank on a html link.

 

Any help would be very appreciated. Thanks.

Link to comment
Share on other sites

Hmmm you mean:

<form method="post" action="action.php" target="_blank">
<input type="text" name="myfield" />
<button type="submit">My Button</button>
</form>

 

The "target" attribute is deprecated in XHTML and will not validate with a Strict Doctype, but brought to life in HTML5. You can use it safely as browser support is assured.

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.