Friday 15 April 2011

javascript - JQuery AJAX call to page method not working -


I have an aspx webpage and it is using the webservice page coded with javascript. Communication between page and web service is done by Ajax. When the page removes the Ajax function, the url parameter is assigned to the website url (localhost / index.aspx # home). Therefore, ASPX can not access webservice In addition, I have not done anything with URL parameters anywhere.

What can be the problem here? any solution?

Ajax code block is here:

  $ Ajax ({type: "POST", url: ServiceParameter + "/ GET_USER_I_BY_EMAIL", data: "{Username: '" + username + "'}", type of content: "Application / Jason; Charset = UTF-8", data Type: "Jason", success: function (msg) {if (msg.d.length == 0+ msg.d == faucet) {if (callof = '' function 'typeof callback ==' function ') { Callback (null);}} else if (msg.d & ​​lt; = 0) {ifof callback_err == 'function' {Callback_err (msg.d, 'SendPass');}} Other {var _data = eval ( "(" + Msg.d + ")"); if (callof_err == 'function' & amp; amp; _data [0]! = Null & amp; amp; amp; amp {Callback_err (_data, 'SendPass');} and if (callback type == 'function') {callback (_data);}}};);;;;; _data [0] .ErrorCode! = 'Undefined' Error: Task (msg) {if (callback_err == Type of 'function') {callback_err (-1, 'SendPass')}}}}); } Hold (error) {if (callof_re == 'type of function') {callback_err (-2, 'sender'); }}},    

Try with the next code:

  $ Post (ServicePamator + "/ GEUsciIiIIBY_ EMAIL", {username: "myUsername"}, function (data) {warning ("data loaded:" + data)}, "jason"). File (function () {warning "Error");});    

No comments:

Post a Comment