2011-07-20 54 views
0

當我在Firefox中玩我的PHP/JS項目時,發生了一些錯誤,網格通常不會加載。

錯誤 - 由Firebug顯示 - 每次在數量和類型上都有所不同。

例如...

...在第一次啓動...

$.jgrid.extend is not a function 
restoreRow : function(rowid, afterrestorefunc) { 

...按F5後...

沒有錯誤發生

...進一步F5後...

$.jgrid.extend is not a function 
getChangedCells : function (mthd) { 
grid.celledit.js (riga 448) 
$.jgrid.extend is not a function 
toggleSubGridRow : function(rowid) { 
grid.subgrid.js (riga 265) 
$.jgrid.extend is not a function 
addChildNode : function(nodeid, parentid, data) { 
grid.treegrid.js (riga 545) 
$.jgrid.extend is not a function 
"avg" : function(v, field, rc) { 
grid.grouping.js (riga 286) 
$.jgrid.extend is not a function 
filterToolbar : function(p){ 
grid.custom.js (riga 128) 
$.jgrid.extend is not a function 
excelExport : function(o) { 
grid.import.js (riga 179) 
$.jgrid.extend is not a function 
gridResize : function(opts) { 
grid.jqueryui.js (riga 471) 
b.jgrid.jqID is not a function 
n=0,p;for(p=0;p<a.p.colModel.length;p+…a.p.id)+" tbody:first tr:first")[0]; 
jquery….min.js (riga 54) 
b.jgrid.jqID is not a function 
M),I={};G=G.slice((N-1)*M,N*M);n=w=nul…load_"+b.jgrid.jqID(a.p.id)).hide(); 
jquery….min.js (riga 75) 
b.jgrid.jqID is not a function 
M),I={};G=G.slice((N-1)*M,N*M);n=w=nul…load_"+b.jgrid.jqID(a.p.id)).hide(); 
jquery….min.js (riga 75) 
b.jgrid.jqID is not a function 
M),I={};G=G.slice((N-1)*M,N*M);n=w=nul…load_"+b.jgrid.jqID(a.p.id)).hide(); 
jquery….min.js (riga 75) 
b.jgrid.jqID is not a function 
n=0,p;for(p=0;p<a.p.colModel.length;p+…a.p.id)+" tbody:first tr:first")[0]; 
jquery….min.js (riga 54) 
b.jgrid.jqID is not a function 
n=0,p;for(p=0;p<a.p.colModel.length;p+…a.p.id)+" tbody:first tr:first")[0]; 
jquery….min.js (riga 54) 
b.jgrid.jqID is not a function 
n=0,p;for(p=0;p<a.p.colModel.length;p+…a.p.id)+" tbody:first tr:first")[0]; 
jquery….min.js (riga 54) 
b.jgrid.jqID is not a function 
M),I={};G=G.slice((N-1)*M,N*M);n=w=nul…load_"+b.jgrid.jqID(a.p.id)).hide(); 

......後又一個F5 ...

其他15個類似的錯誤發生。

在項目的主頁我包括圖書館如下:

<!DOCTYPE html> 
<html> 
    <head>  
     <title></title>   
     <link type="text/css" href="js/jquery/css/cupertino/jquery-ui-1.8.13.custom.css" rel="stylesheet" />  
     <script type="text/javascript" src="js/jquery/js/jquery-1.5.1.min.js"></script> 
     <script type="text/javascript" src="js/jquery/js/jquery-ui-1.8.13.custom.min.js"></script> 
     <link rel="stylesheet" type="text/css" media="screen" href="js/jqGrid/src/css/ui.jqgrid.css" /> 
     <script src="js/jqGrid/js/i18n/grid.locale-it.js" type="text/javascript"></script> 
     <script src="js/jqGrid/js/jquery.jqGrid.min.js" type="text/javascript"></script> 
     <script src="js/jqGrid/src/grid.loader.js" type="text/javascript"></script> 

我想知道什麼是錯的。謝謝,

+0

你把你的javascript代碼放在jquery ready函數中嗎? '(script language =「JavaScript」type =「text/JavaScript」> $(document).ready(function(){myJavascriptCode();});' –

+0

Hallo Geoffroy,我照你的意思做了......但是錯誤仍然出現:-( – Flattit82

+0

好的。你真的需要'grid.loader.js'嗎?通常在jqgrid的最後一個版本中,我們不會不需要它(在我的項目中我沒有) –

回答

0

嘗試並粘貼到瀏覽器的地址欄中的鏈接到電網的js文件(前置與您的網站的地址):

[http://localhost/YourSite]/js/jqGrid/js/jquery.jqGrid.min.js 

,看看它是否顯示JS腳本。如果沒有 - 這意味着地址是錯誤的,並且網格不加載(然後$ .jgrid不存在)。

+0

我照你的建議做了,瀏覽器顯示了腳本...所以地址是OK的,奇怪的是,在Explorer中,項目沒有播放問題(錯誤)。包含順序有問題嗎? – Flattit82

相關問題