Avoid unwanted form submission

getpayforqnawk

New Member
I have a problem when I want to use a button to switch into another page, and another button to just close the window (a popup)No matter which button I click, the form submits. What can I do to avoid this (apart from switching the \[code\]</form>\[/code\] between the two buttons) ?The code:\[code\]<form action="name.php" method="post"> <input type="hidden" name="number" value="http://stackoverflow.com/questions/14044305/<?php echo $id;?>"> <input type="hidden" name="position" value="http://stackoverflow.com/questions/14044305/<?php echo $pos;?>"><button type="submit">Yes</button> <button onclick="window.close()">No</button></form> \[/code\]
 
Back
Top