Monday, June 3, 2024
 Popular · Latest · Hot · Upcoming
2
rated 0 times [  8] [ 6]  / answers: 1 / hits: 29452  / 13 Years ago, thu, august 4, 2011, 12:00:00

I get ajax response as JSON and need to fill a form with it. How to do that in jQuery or something else ? Is something better than using $(json).each() ?



JSON:



{ 
id : 12,
name: Jack,
description: Description
}


Form to fill



<form>
<input type=text name=id/>
<input type=text name=name/>
<input type=text name=description/>
</form>

More From » jquery

 Answers
7

You might want to take a look at the jQuery Populate plugin.



Although if this is the only use case you have, you might as well do it manually.


[#90830] Tuesday, August 2, 2011, 13 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
daja

Total Points: 407
Total Questions: 103
Total Answers: 103

Location: Ghana
Member since Sun, Mar 27, 2022
2 Years ago
daja questions
Tue, Dec 21, 21, 00:00, 3 Years ago
Thu, Apr 23, 20, 00:00, 4 Years ago
Fri, Sep 6, 19, 00:00, 5 Years ago
Tue, Jul 23, 19, 00:00, 5 Years ago
;