When I submit my form with jQuery:
$('#saveButton').click(function () {
if (true) {
$('#submitForm').submit();
}
});
I get an error in the file jquery....min.js:
SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data
I'm using asp.net MVC to generate the form:
@using (@Html.BeginForm("ActionName", "ControllerName", FormMethod.Post, new { id = "submitForm" }))
Submit Buttons. I am using the top one. The button one is not clicked when this happens:
<input type="button" id="saveButton" class="bigButton" value="Save" />
<input type="submit" id="submitRequestButton" class="bigButton" value="Submit" />
I look in the network tab on FF and I don't see a POST. How can I track down or narrow down what is causing this problem?
Update
The code in the console window is all I get and its pointing me to the minified jQuery lib:
/*! jQuery v2.1.0 | (c) 2005, 2014 jQuery Foundation, Inc. | jquery.org/license */ !function(a,b){"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){var c=[],d=c.slice,e=c.concat,f=c.push,g=c.indexOf,h={},i=h.toString,j=h.hasOwnProperty,k="".trim,l={},m=a.document,n="2.1.0",o=function(a,b){return new o.fn.init(a,b)},p=/^-ms-/,q=/-([\da-z])/gi,r=function(a,b){return b.toUpperCase()};o.fn=o.prototype={jquery:n,constructor:o,selector:"",length:0,toArray:function(){return
...and this goes on for about 1000 more lines or so.