var $g_ref_data_arr=''; $host_url= getCookie('host_url'); $image_path= getCookie('image_path'); function POpupExamnohtml($degree_code,$exam_no) { $('#dialog').dialog('open'); $(".ui-dialog").data("height.dialog", 175); $(".ui-dialog").css({width:450}); $("#dialog").css({height:176}); $('#ui-dialog-title-dialog').html("Examno Details"); document.getElementById('dialog').style.display = ''; $main="
"; document.getElementById('dialog').innerHTML=$main; var exam =jQuery("#exam_grid").jqGrid( { url:$host_url+'ExamnoDetailsPopup.demo&DegCode='+$degree_code+'&Examno='+$exam_no+"'", //url:+$host_url+'ExamnoDetailsPopup.demo&DegCode='+trim($degcode)+'&searchField='+trim($Examno)+, datatype: 'json', colNames:['ExamNo','Exam Name'], colModel:[{name:'fexamno',index:'fexamno', width:75 }, {name:'fexamname',index:'fexamname', width:115 }], rowNum:10,rowList:[5,10,15,20,25,30], pager: jQuery('#sub_grid_div3'), sortname: 'id', imgpath:$image_path, height:'100',width:'445',viewrecords: true, sortorder: 'asc',multiselect: false,cellEdit: true, addCaption: 'Add Record' }).navGrid('#sub_grid_div3',{edit:false,add:false,del:false,search:false},{},{},{},{multipleSearch:true}). navButtonAdd('#sub_grid_div3',{caption:"", buttonicon :'ui-icon-search', onClickButton:function(){exam[0].toggleToolbar() } }). navButtonAdd('#sub_grid_div3',{caption:"Select", onClickButton:function() { selectMarkEntrySubExamCode(); } }); exam.filterToolbar(); $("#gs_fexamno").focus(); $('.ui-search-toolbar').bind('keydown',function(evt) { var kC = (evt.which) ? evt.which : evt.keyCode; if(kC==40) jQuery('#exam_grid').editCell(0,0,false); /* if(kC==39) $('#'+evt.target.id).focusNextInputField(); if(kC==37) $('#'+evt.target.id).focusPreviousInputField(); */ } ); } function selectMarkEntrySubExamCode() { var id=jQuery("#exam_grid").getGridParam('selrow'); if( id!=null ) { $.ajax({ type: "POST", async:false, data: "ExamNo="+id+"°ree="+window.location.g_popup_degree_code, url: $host_url+"getExamNo.demo", success: PopulateExamNoResponse }); $('#dialog').dialog("close"); } else { alert("Please select row"); } return; } function PopulateExamNoResponse($responce) { $responce = eval('(' + $responce + ')'); if($responce.error_code == 0) { switch(document.getElementById('module_name_for_save').value) { case 'SaveMarkEntrySubjectwise': document.getElementById('markentry_sub_Examno').value = $responce.data['fexamno']; document.getElementById('markentry_sub_Exam_name').value = $responce.data['fexamname']; document.getElementById('markentry_sub_final_subcode').focus(); break; case 'SaveMarkEntryStudentwise': document.getElementById('markentry_stu_Examno').value = $responce.data['fexamno']; document.getElementById('markentry_stu_Exam_name').value = $responce.data['fexamname']; document.getElementById('markentry_stu_Regno').focus(); break; case 'SaveAbsentEntrySubjectwise': document.getElementById('abs_sub_Examno').value = $responce.data['fexamno']; document.getElementById('abs_sub_Exam_name').value = $responce.data['fexamname']; document.getElementById('abs_sub_final_subcode').focus(); break; case 'freezeModuleAtAdminCollegeSubject': document.getElementById('fmacas_sub_Examno').value = $responce.data['fexamno']; document.getElementById('fmacas_sub_Exam_name').value = $responce.data['fexamname']; document.getElementById('fmacas_category_name').focus(); break; case 'SavePracticalEntryFreezing': document.getElementById('fmacas_sub_Examno').value = $responce.data['fexamno']; document.getElementById('fmacas_sub_Exam_name').value = $responce.data['fexamname']; //document.getElementById('fmacas_category_name').focus(); break; case 'saveSubjectListGeneral': document.getElementById('report_sublist_general_Examno').value = $responce.data['fexamno']; document.getElementById('report_sublist_general_Exam_name').value = $responce.data['fexamname']; break; case 'saveMarklistSubjectWise': document.getElementById('report_marklist_subject_Examno').value = $responce.data['fexamno']; document.getElementById('report_marklist_subject_Exam_name').value = $responce.data['fexamname']; break; case 'saveMarklistStudentWise': document.getElementById('report_marklist_student_Examno').value = $responce.data['fexamno']; document.getElementById('report_marklist_student_Examno_name').value = $responce.data['fexamname']; break; case 'saveDatewar': document.getElementById('report_marklist_subject_wise_Examno').value = $responce.data['fexamno']; document.getElementById('report_marklist_subject_wise_Exam_name').value = $responce.data['fexamname']; break; case 'saveDispatchAnswersScript': if($g_dispatch_popup==2) { $Textbox = document.getElementsByName("dispatch_ans_degree"); $NumTextBox = $Textbox.length; $("#dispatch_exam_"+$NumTextBox).val($responce.data.fexamno); document.getElementById('dispatch_exam_'+$NumTextBox).focus(); } else { $("#dispatch_exam_1").val($responce.data.fexamno); document.getElementById('dispatch_exam_1').focus(); } break; case 'saveDailyReport': $id = window.location.g_daliy_id; document.getElementById($id).value = $responce.data['fexamno']; break; case 'ReportAdmissionList': document.getElementById('report_Examno').value = $responce.data['fexamno']; document.getElementById('report_Exam_name').value = $responce.data['fexamname']; break; case 'SaveBatchSetup': document.getElementById('batch_sub_Examno').value = $responce.data['fexamno']; document.getElementById('batch_sub_Exam_name').value = $responce.data['fexamname']; document.getElementById('batch_sub_final_subcode').focus(); break; } } }