I have a form having some data
<form id="abc" method="POST" action="abc.html">
<input type="hidden" id="a" name="a" />
<input type="hidden" id="b" name="b" value="save"/>
</form>
and in js file i am submitting this form
document.getElementById("abc").submit();
What i want to do is if it throws any exception then an alert popup should open. Can anyone help?