jqGrid select onchange event populate value to another field

Posted: August 31, 2011 in web
{name:'BuilderID',index:'BuilderName', width:100,align:"right",editable:true,
stype:'select',surl:'selectdata.php?q=builder_s',edittype:"select",
editoptions:{dataUrl:"selectdata.php?q=builder", dataEvents:
[
{ type: 'change',fn: function(e) {

var ret = $.ajax({
url:'selectdata.php?q=setState&BuilderID='+$(this).val(),
async:false
}).responseText;
$('#State').val(ret);

} }
]
}},
Advertisements
Comments
  1. Aziz says:

    thanks, this tutorial really helped me

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s