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
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
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,
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:
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?
});
}
$.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
6 matches
Mail list logo