I am posting data from one ASP.NET page to another via jQuery ajax call in a form of JSON.
I am simulating the situation, where is get an error on ajax call. I get a response message in case of an error and I need to assign this html to an element on the page.
Here is what I get in a message:
I have the msg javascript variable, that, when looked up via Chrome debugger shows me that it contains info I need in responseText.
How do I get the value of responseText to display on the page?
In JavaScript variable names are case sensitive. In your example, you were trying to access the
responseTextfield on the msg object, but you had a capital ‘R’. Try this instead:Or in much better style: