[jQuery] Re: Fill form fields with value returned from a query

2007-07-12 Thread ashutosh bijoor
Check out the deserialize plugin. It does exactly what you need: http://www.reach1to1.com/sandbox/jquery/testform.html On 7/6/07, Jean [EMAIL PROTECTED] wrote: I think .getJSON better for this dont? $.getJSON('teste.php',{query: 'edit', id: idval}, function(data){ $([EMAIL

[jQuery] Re: Fill form fields with value returned from a query

2007-07-12 Thread Dan G. Switzer, II
Check out the deserialize plugin. It does exactly what you need: http://www.reach1to1.com/sandbox/jquery/testform.html I've also added a formHash() method to my Field Plug-in which offers the same type of functionality (along with other functionality): http://jquery.com/plugins/project/field

[jQuery] Re: Fill form fields with value returned from a query

2007-07-06 Thread Jean
I think .getJSON better for this dont? $.getJSON('teste.php',{query: 'edit', id: idval}, function(data){ $([EMAIL PROTECTED]).val(data.nome); }); On 6/29/07, Massimiliano Marini [EMAIL PROTECTED] wrote: $.ajax({ type: POST, url: test.php, data: query:editid=+idval,

[jQuery] Re: Fill form fields with value returned from a query

2007-06-28 Thread Dan G. Switzer, II
like in the subject, I do a query with $.ajax on a php file, the query retrieve a name and a surname, in which format I must send out the data from my php file? And how I can manage this data to fill in the appropiate field in my form? My actually jQuery code : $.ajax({ type: POST, url:

[jQuery] Re: Fill form fields with value returned from a query

2007-06-28 Thread Luiz Vitor
You could try $.each $.ajax({ type: POST, url: test.php, data: query:editid=+idval, dataType: json, success: function(data){ $.each(data, function(index, value) { id = '#' + index; $(id).val(value); // does anyone know if this works? }); }

[jQuery] Re: Fill form fields with value returned from a query

2007-06-28 Thread Dan G. Switzer, II
$.ajax({ type: POST, url: test.php, data: query:editid=+idval, dataType: json, success: function(data){ $.each(data, function(index, value) { id = '#' + index; $(id).val(value); // does anyone know if this works? The $.val() method only works with