vendredi 15 avril 2011

JQuery - Polulate forms.

Here is a simple tip to populate a form, found on the great site 'StackOverFlow'
by Eran Galperin

$.each(data, function(name,value) {
    $
("input[name='" + name + "']").val(value);
});

In order to select all the elements comprise 'TextArea' and
 'Select' box  JacobM  suggest to use  $(":input[name=...")

Thanks guy

Aucun commentaire:

Enregistrer un commentaire