Issue with jQuery .submit()
- by d.lanza38
I'm having an issue submitting a form with the jquery .submit();
I don't have any elements on my page with a name of name="submit" or name="Submit", same goes for id's.
My bit of jQuery code is as follows:
$(document).ready(function () {
$(document).on('click', "#appSubmit",function(e){
e.preventDefault();
var value = $("#time").val();
if(value == "--"){
$( "#err-time" ).dialog( "open" );
}else{
alert("1");
var dummy = $("#appSubmit").val();
alert(dummy);
$("#appSubmit").submit();
alert("2");
}
});
});
All of the alerts work properly, even the alert(dummy); prints out the correct value. The alert("2"); prints out, so it isn't even breaking on the $("#appSubmit").submit();
My submit button is
<input type="submit" name="appSubmit" id="appSubmit" value="Apply">
Any thoughts would be appreciated, thanks.