c# - Javascript runtime error:function expected ajax call -
I'm doing ajax on the phone to see the controller, in which I'm having an error javascript run time error :. Expectation of the ceremony
My script here
& lt; script type = "text / javascript" & gt; Var jsonData = []; Var ms1 = $ ('# ms-tpl'). MagicSuggest ({Data: jsonData, sortOrder: 'name', maxResults: false}); Click on $ ('# Register') (function () {taggit = document.getElementById ('TagId') value at dataplus = ms1.getValue (); debugger; tagtitle = document.getElementById ('TagTitle Tag name 'document.getElementById (' TagContent ') value, $ .ajax () ({url:'? Tagid = '?' @ Url.Action ("post") '+ + + + tagid +' tagtitle =? '+ tagtitle +' tagname = '+ tagname +' dataplus = '+ dataplus, type:' POST ', cache: false, success: function (html) {$ (' # bind ') HTML ;}}}})}}; $ ('#click') Click (function () {debugger; warning (ms1.getValue ());}); & Lt; / Script & gt; Note: I am using the MAgicSelect query to select multiple values. Pls help me with it.
Try $ Ajax (instead of { .. $ ajax () ({ consider this:
function outerFunction () Since { outerFunction } actually returns a function {var innerFunction = function () {warning ('hay');}; return innerFunction;} What you were trying to do could be:
External function () ();
However, you do not Can not:
$. Ajax () (); Because $. Ajax () does not return the function, It gives a jqXHR object. You can execute only $ .ajax and pass your configured object as a parameter: $. Ajax ({...}); < / Div>
Thanks for your information! Keep sharing..
ReplyDeleteMovers and Packers in Surat
Packers and Movers in Vadodara