Look this code guys:
<script type="text/javascript">
$("#<?=$delete_uid?>").click(function() {
var id = $("#<?=$grid_uid?>").jqGrid('getGridParam','selrow');
alert(id);
if(id == null) {
$.jGrowl("No selected Item");
return;
}
confirm('Caution','Delete current selected item?', function(result) {
if(result==true) {
alert(id);
url = "<?=ADMIN_URL?>/account/delete/id/" + id;
execURL(url, function(result) {
if (result==true) {
$.jGrowl("Item removed!!");
$("#<?=$grid_uid?>").trigger("reloadGrid");
} else
$.jGrowl("Remove failure!!");
});
}
});
});
</script>
obs: alert is for debugging purpose only.
In first pass id comes from jqgrid its write an everything its ok but, on second time id only in confirm function callback maintains the first value.
Please help, lost 3 hours on this!