Microsoft
Software
Hardware
Network
Question : Can a submit button open multiple windows?
I have a form in a php doc that opens
<form target="_blank" method="POST" action="voucher_verify.php
?id=3">
... input fields ....
<input name="voucher_submit" type="submit" value="Print Voucher">
</form>
Upon clicking submit, the form opens a new window that inserts the information into a sql db, and creates a form to be printed.
However, the page where the submit button resides stays open.
I want to to work so that when you click submit, it opens the new window the way it does now, but also redirect the current page back to anything else ... (i.e. index.php)
I tried some java, which is probably the best method - I'm just doing it wrong.
I tried something along the lines of <input name="voucher_submit" type="submit" onclick="index.php" value="Print Voucher">
Please help
Answer : Can a submit button open multiple windows?
All you need is to correct your code this way:
<input name="voucher_submit" type="submit" onclick="location.replace(
'index.php
');" value="Print Voucher">
Best regards
Random Solutions
Exchange 2003 does not work after reinstalling SMTP service on SBS 2003 Server
asp.net - I have a problem - i cannot connect an ajax calendar extention & textbox to the where clause of a gridview datasouce..
URGENT - SBS 2008 No primary network adapter found
Windows7 my Documents folder
IE8 Submit Form with [Enter] Key, not functioning properly
File Uploads with jQuery Form and jQuery Validation
Why won't Exchange Transport service start in Exchange 2007 on our SBS 2008 server ?
instantiating an object in php
VMware Workstation 7.1 Won't Install
Disable IPv6 on windows 2008