Loading HTML controls from JSON in jQuery (i.e., Converse from Ajax serialiseArray)

I would like to take a set of controls (INPUT, SELECT, TEXTAREA) that are contained in the DIV and send their values ​​as JSON via Ajax to the server. It is quite simple with jQuery serializeArray .

However, I then want the server to respond with the same JSON structure that was sent and reloaded the control values ​​using the provided JSON. I cannot find anything in jQuery documentation that would make this a simple operation.

Am I missing something or do I need to build it myself?

+3
source share
2

: controlname: , jQuery - :

$("*[name='" + controlname + "']").val( value);

: controlID:

$("#" + controlID).val( value);
+4

JSON.

JSON , JSON .

, , jQuery . XML/JSON . , , - .

, , . , , Ext.js.

+2

All Articles