Ive seen that there are forms that dont reset the page using jquery. however im not well versed in it and am still not 100% comfortable with jquery so my brain usually goes on the rampage trying to figure it out any other way. If i have a very small div with maybe position set to top:-20px; left:-20px; and in that div was a small iframe. If i submit my form to the iframe then the page doesnt reset. I dont neccisarily need for information to be passed back to the page with the form on it so my question is... is this a valid method? what are the pros and cons of it.
<form name="mine" action="testf.php" method="post" target="subbers">
<input name="quantity" type="text" value="1" required="required" /><input name="addcart" type="submit" value="submit" />
<iframe name="subbers" src="blank.php" width="2" height="2" style="position:absolute; top:-20px; left: -20px;"></iframe>
echo "welcome to this page<br>";
$quantity = $_POST['quantity'];
echo "you have selected ".$quantity." items";