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
https://forums.phpfreaks.com/topic/237061-open-results-page-in-new-window/
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.

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.