If you want to know about JSON (mean how to create and what is the structure of JSON Oject ) then follow these links:
1. http://www.jkstack.com/2013/07/how-to-create-json-object-in-javascript.html
2. http://www.jkstack.com/2013/07/how-to-change-second-dropdownlist-value.html
Today, i am gonna show you how to create JSON Array with Ajax call.
Here is the HTML code:
<input id="saveValues" type="button" value="Click me for generate JSON Array" />
Here is the Jquery code:
$("#saveValues").click(function (event){ |
Descriptions of Commented line numbers in the above code:
1. Declaration JSON array
2. Pushing values to JSON Array
3. A JSON-formatted string representing the values
4. Passing JSON String as a parameter to Ajax Call
5. URL to be called
6. To do something with response
Check running example here:
http://jsfiddle.net/jeetu_verma11/tzxnQ/
[...] In last tutorial we discussed , how to create JSONArray of JSONObjects and pass with Ajax call in JSP.If you want to refer then visit this link: http://www.jkstack.com/2013/08/how-to-create-json-array-object-with.html [...]
ReplyDeleteit worked for keep posting like this.........
ReplyDelete