jQuery mobile ajax call returning SyntaxError -


I'm getting xhr.status = 200 which means that is good, but then the following:

< Pre> syntax error: missing; Before the statement

I do not know where this error is throwing. Here's my HTML:

  & lt; Link rel = "stylesheet" href = "http://code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.mine.css" /> & Lt; Script src = "http://code.jquery.com/jquery-1.9.1.min.js" & gt; & Lt; / Script & gt; & Lt; Script src = "http://code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.min.js" & gt; & Lt; / Script & gt; & Lt; Div data-role = "page" id = "login" data-theme = "a" & gt; & Lt; Div data-role = "header" & gt; & Lt ;! - Data-theme = "A" - & gt; & Lt; H3 & gt; Company logo & lt; / H3 & gt; & Lt; / Div & gt; & Lt; Div data-role = "content" & gt; & Lt; Form name = "loginForm" id = "loginForm" class = "ui-body ui-body-a ui-corner-all" data-ajax = "wrong" & gt; & Lt; Fieldset & gt; & Lt; Div data-role = "field content" & gt; & Lt; Input type = "text" name = "user name" id = "username" value = "placeholder =" user id "/> & Lt; / Div & gt; & Lt; Div data-role = "field content" & gt; & Lt; Input type = "password" name = "userPassword" id = "userPassword" value = "" placeholder = "password" auto-integer = "off" / & gt; & Lt; / Div & gt; & Lt; Input type = "button" name = "submit" id = "submit" value = "login" data-theme = "d" /> & Lt; P & gt; Keep me logged in? & Lt; Input type = "checkbox" name = "keep lagined" id = "keepLoggedIn" data-role = "flip switch" data-theme = "d" /> & Lt; / P & gt; & Lt; / Fieldset & gt; & Lt; / Form & gt; & Lt; / Div & gt; & Lt; Div data-theme = "a" data-role = "footer" data-position = "fixed" & gt; & Lt; / Div & gt; & Lt; / Div & gt; & Lt; Div data-role = "page" id = "second" & gt; & Lt; Div data-role = "header" & gt; & Lt; H3 & gt; Company logo & lt; / H3 & gt; & Lt; / Div & gt; & Lt; Div data-role = "content" & gt; Upload photos & lt; / Div & gt; & Lt; Div data-theme = "a" data-role = "footer" data-position = "fixed" & gt; & Lt; H3 & gt; Page footer & lt; / H3 & gt; & Lt; / Div & gt; & Lt; / Div & gt;  

This is my javascript:

  $ (document) .on ('pageinit', '#login', function () {$ (document) .on ('click', '#submit', function () {if ($ ('$ username'). Val () Length> 0 & amp; amp; amp; amp; amp; ($ User 'password). Val () Length & gt; 0) {// Send data to server through Ajax call / action. The call is the functionality that we want to call and output JSON our data $ .xx ({url: "second.cfm", data: {action: 'getUser', 'jsonp', contentType: "application / json", first message: function () {call this The function data will trigger before being sent to $ $. Mobile Loading ("Show"); // This will show Ajax Spinner, complete: Function () {// This callback function will trigger / triggered when data is sent $ .mobile.loading ("hide"); // This will hide the AJAX spinner, success: work (results) {if (result .UCCE) {$ ("# sec"). Page Container ("change");} And {warning ('logon failed!');}}, Error: work (xhr, ajaxOptions, thrownError) {warnings ('network error occurred Is it please try again! '); Warning (xhr.status); Warning (thrownError); }}); } And {warnings ('Please fill in user ID and password!'); }        return false; // stop the original event to stop submitting the form}); });  

I can go to "second.cfm" without any errors. It displays:

  {"MSG": "user logged in", "success": true}  

I will be back Played with JSON, but he did not help either

Do you think that these syntax errors return? This is driving me crazy

Thanks in advance.


Comments