javascript - Google Analytics Dashboard AJAX Function Does Not get values -


I used the following function to pass some data into an ASP.NET web service.

  Function Set Janssen () {$. Ajax ({url: "/APIWebService.asmx/AnalyticsDataShowWithPost", type: 'post', data: {email: 'clientlink@russell.com', password: 'russell1234', URL: GetVaria ()}, success: work ( Data (warning "(" success warning "+ data); var sTitle = $ (data) .find ('string'). Alert (" sTitle Alert "+ sTitle); Warning (" Data String " Data);}, error: function (xhr, textstatus, errorThrown) {warning ('error in simple method'); warning (textstats); alert (errorThrown);}}); $. AJAX ({url: "/APIWebService.asmx/GetMessage", type: 'post', data: {email: 'clientlink@russell.com', password: 'russell1234', URL: getVaria ()}, success: Function (data) {warning (success); var sTitle = $ (data) .find ('string'). Text (); alert (attitle); alert (data);}, error: function (xhr, textStatus, errorThrown ) {Warning ('error in simple method'); warning (textstats); warning (error pole);}}); }   

I have warned.

  Data: {email: 'clientlink@russell.com', password: 'russell1234', URL: getVaria ()},   

Code> [object document] . I think the warning should not be. So do you have any ideas, opinions?

Thanks & amp;

You are making data wrong.

Try

  Data: {'email': 'clientlink@russell.com', 'password': 'russell1234', 'URL': getVaria ()}   

If you want to send JSON as formatted data, you may also want to use JSON.stringify as per the comment.

Edit

Try to create a new var-named myData- $. Over the command command:

  var myData = {'email' : 'Clientlink@russell.com', 'password': 'russell1234', 'URL': getVaria ()};   

Use this line for data in your AJAX command:

  Data: JSON.stringify (myData);    

Comments

Popular posts from this blog

ios - Adding an SKSpriteNode to SKScene from a child SKSpriteNode -

Matlab transpose a table vector -

c# - Textbox not clickable but editable -