Linux ip-172-26-7-228 5.4.0-1103-aws #111~18.04.1-Ubuntu SMP Tue May 23 20:04:10 UTC 2023 x86_64
Your IP : 18.226.169.169
function keyboardDeptPopup(evt,id,Colcode)
{
var kC = (evt.which) ? evt.which : evt.keyCode;
if(kC==112) //F1 Key code
{
openDeptDetailsPopup();
return false;
}
}
function openDeptDetailsPopup()
{
$('#dialog').dialog('open');
$("#dialog").data("height.dialog", 222);
$(".ui-dialog").css({width:460});
$('#ui-dialog-title-dialog').html("College Details");
$main="<table id='table_grid3' class='scroll' ondblclick='SelectDeptCode();'></table>";
$main+="<div id='sub_grid_div3' class='scroll' style='text-align:center;'></div>";
document.getElementById('dialog').innerHTML=$main;
var college =jQuery("#table_grid3").jqGrid(
{
url:$host_url+'openDeptDetailsPopup&search=',
datatype: "json",
colNames:['Code','Description'],
colModel:[{name:'FDEPTCODE',index:'FDEPTCODE', width:115 },
{name:'FDEPTNAME',index:'FDEPTNAME', width:115 }],
rowNum:10,
rowList:[5,10,15,20,25,30],
imgpath:$image_path,
pager: jQuery('#sub_grid_div3'),
sortname: 'id',
height:'119',
width:'457',
viewrecords: true,
sortorder: 'desc',
multiselect: false,
cellEdit: true,
addCaption: "Add Recordddd"
}
).navGrid('#sub_grid_div3',{edit:false,add:false,del:true,search:true},{},{},{},{multipleSearch:true}).
navButtonAdd('#sub_grid_div3',{caption:"Search",
buttonicon :'ui-icon-search', onClickButton:function(){college[0].toggleToolbar() } }).
navButtonAdd('#sub_grid_div3',{caption:"Select", onClickButton:function()
{
SelectDeptCode();
}
});
college.filterToolbar();
}
function SelectDeptCode()
{
var id=jQuery("#table_grid3").getGridParam('selrow');
if( id!=null )
{
$.ajax({
type: "POST",
async:false,
url: $host_url+"SelectDeptCode",
data: "FDEPTCODE="+id,
success: SelectDeptCodeResponse
});
$('#dialog').dialog("close");
}
else
{
alert("Please select row");
}
return;
}
function SelectDeptCodeResponse($responce)
{
$responce = eval('(' + $responce + ')');
if($responce.error_code == 0)
{
document.getElementById($g_focus_element).value = $responce.data['FDEPTCODE'];
}
}
|