I have following form,
<form method="post" action="test.php" id="offer1Form">
<input type="hidden" name="c" value="3883316">
<input type="hidden" name="qtyadd" id="qtyadd" value="1">
<input type="hidden" name="buyid" id="buyid" value="multi">
<input type="hidden" name="multi" id="multi" value="11,1;150,1;182,1;27,1; ">
<input type="hidden" name="promocode" value="<?php echo $promote_code1?>">
<input type="hidden" name="continue" value="<?php echo " http://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI] "; ?>" />
<map name="map">
<area id="offer1" shape="rect" coords="657, 515, 913, 557" href="" />
</map>
</form>
and I'm trying submit this using following jquery code,
$(document).ready(function() {
$("#offer1").click(function() {
$("#offer1Form").submit();
//document.getElementById("offer1Form").submit();
alert('something');
});
});
alert displayed, but form is not submitted. Please tell me the reason about this issue.
document.getElementById("offer1Form").submit();preventDefault()alertbecauseformis submitted and page is redirected