A syntax error was encountered today in a project that jumps with Ajax and passes data in a URL
functionSave (Flag,checkflag) {$ (' #allInfoForm '). Ajaxsubmit ({dataType:' JSON ', type:"POST", data:{"Operationflag": Flag, "Checkflag": Checkflag, "ApplicationID": ' $!applicationid '}, Success:function(data) {if(data.success) {dialog.message (Data.message,"Prompt",function() {self.location.href=contextpath+ "/intopieces/applyintopiecewait/change.page?applicationid=" + ' $!applicationid ' + "&customerId=" + ' $!customerid ' + ' &applyquota= ' + ' $!applyquota ' + ' &serialnumber= ' + ' $!serialnumber '; }); } Else{dialog.message (data.message); return false; }}, Error:function(data) {dialog.closeload (); Dialog.message ("Operation failed"); return false; } }); }
Syntaxerror:identifier starts immediately after numeric literal
The value of the parameter is:
| ApplicationID |
402881e74a384553014a385826a70003 |
| Applyquota |
1000 |
| CustomerId |
0000000049bb6a710149bb872c1d0007 |
| SerialNumber |
402881e74a384553014a385882e5000d |
Workaround:
Applicationid= "+ ' $!applicationid ' +" &customerid= "+ ' $!customerid ' +" &applyquota= "+ ' $!applyquota ' +" & Serialnumber= "+ ' $!serialnumber ';
When stitching, the data to be transmitted is enclosed in '.
Syntaxerror:identifier starts immediately after numeric literal error resolution