필자는 지난 몇 일을 많이 jqgrids 덤비는되어 트러블 나는 거의 모든jQuery를/jqGrids/제출 양식 데이터는
임 원하는 내가 화면에서 원하는 방식으로, 다른 그리드와 탭 등이 모눈에서 요소를 추가하고 편집하는 데 Modal을 사용합니다. 임이 내 문제는 이것입니다. 나는 내 editurl을 가지고있다 : "editsu.php"set, 만약 그 파일의 이름이 바뀌면, 나는 modal에서 404를 얻는다. 그러나 해당 파일을 사용하면 아무 일도 일어나지 않을 것입니다. 나는 심지어 주사위를 굴린다. 라인 상단에, 그래서 파일을보고, 그냥 그걸로 아무것도하지 않습니다.
다음은 내용입니다. ........ 인덱스 페이지 editsu.php 파일에 대한 지금
jQuery("#landings").jqGrid({
url:'server.php?tid=1',
datatype: "json",
colNames:['ID','Tower','Sector', 'Client', 'VLAN','IP','DLink','ULink','Service','Lines','Freq','Radio','Serial','Mac'],
colModel:[
{name:'id', index:'id', width : 50, align: 'center', sortable:true,editable:true,editoptions:{size:10}},
{name:'tower', index:'tower', width : 85, align: 'center', sortable:true,editable:false,editoptions:{readonly:true,size:30}},
{name:'sector', index:'sector', width : 50, align: 'center',sortable:true,editable:true,editoptions:{readonly:true,size:20}},
{name:'customer',index:'customer', width : 175, align: 'left', editable:true,editoptions:{readonly:true,size:35}},
{name:'vlan', index:'vlan', width : 35, align: 'left',editable:true,editoptions:{size:10}},
{name:'suip', index:'suip', width : 65, align: 'left',editable:true,editoptions:{size:20}},
{name:'datadl',index:'datadl', width:55, editable: true,edittype:"select",editoptions:{value:"<? $qr = qquery("select * from datatypes"); while ($q = ffetch($qr)) {echo "$q[id]:$q[name];";}?>"}},
{name:'dataul', index:'dataul', width : 55, editable: true,edittype:"select",editoptions:{value:"<? $qr = qquery("select * from datatypes"); while ($q = ffetch($qr)) {echo "$q[id]:$q[name];";}?>"}},
{name:'servicetype', index:'servicetype', width : 85, editable: true,edittype:"select",editoptions:{value:"<? $qr = qquery("select * from servicetype"); while ($q = ffetch($qr)) {echo "$q[id]:$q[name];";}?>"}},
{name:'voicelines', index:'voicelines', width : 35, align: 'center',editable:true,editoptions:{size:30}},
{name:'freqname', index:'freqname', width : 35, editable: true,edittype:"select",editoptions:{value:"<? $qr = qquery("select * from freqband"); while ($q = ffetch($qr)) {echo "$q[id]:$q[name];";}?>"}},
{name:'radioname', index:'radioname', width : 120, editable: true,edittype:"select",editoptions:{value:"<? $qr = qquery("select * from radiotype"); while ($q = ffetch($qr)) {echo "$q[id]:$q[name];";}?>"}},
{name:'serial', index:'serial', width : 100, align: 'right',editable:true,editoptions:{size:20}},
{name:'mac', index:'mac', width : 120, align: 'right',editable:true,editoptions:{size:20}}
],
rowNum:20,
rowList:[30,50,70],
pager: '#pagerl',
sortname: 'sid',
mtype: "GET",
viewrecords: true,
sortorder: "asc",
altRows: true,
caption:"Landings",
editurl:"editsu.php",
height:420
});
jQuery("#landings").jqGrid('navGrid','#pagerl',{edit:true,add:true,del:false,search:false},{height:400,reloadAfterSubmit:false},{height:400,reloadAfterSubmit:false},{reloadAfterSubmit:false},{});
..
$operation = $_REQUEST['oper'];
if ($operation == "edit") {
qquery("UPDATE customers SET vlan = '".$_POST['vlan']."', datadl = '".$_POST['datadl']."', dataul = '".$_POST['dataul']."', servicetype = '".$_POST['servicetype']."', voicelines = '".$_POST['voicelines']."', freqname = '".$_POST['freqname']."', radioname = '".$_POST['radioname']."', serial = '".$_POST['serial']."', mac = '".$_POST['mac']."' WHERE id = '".$_POST['id']."'") or die(mysql_error());
}
임은 힘든 시간을 알아 내기 위해이 문제를 해결하는 데 그 곳에 매달리는 곳.
내 다음 질문은 가능한 한 "추가"를 클릭하면 자동으로 몇 개의 변수가있는 db에 행을 삽입하고 모달 창을 표시하는 것입니다. 먼저 첫 번째 문제에 대한 부작용.
감사합니다.
넣어'error_reporting를 (E_ALL)'. 간단한 PHP 오류 일 수 있습니다. – cmptrgeekken