Php jqGrid突然停止工作

Php jqGrid突然停止工作,php,jquery,jqgrid,smarty,Php,Jquery,Jqgrid,Smarty,几年前,我创建了一个php+smarty应用程序,其中使用了jqGrid 这些是版本号:jquery1.2.6,jqGrid 3.2.3 那时候还不错 几天前,当我检查它不工作时。更奇怪的是,它在ie8上工作,在firefox和chrome浏览器上失败 我通过firefox中的firebug控制台进行了检查,发现以下错误: TypeError: jQuery(...).jqGrid is not a function 我不明白为什么突然出现这个错误 我已包括以下文件: <link rel

几年前,我创建了一个php+smarty应用程序,其中使用了jqGrid

这些是版本号:
jquery1.2.6,jqGrid 3.2.3

那时候还不错

几天前,当我检查它不工作时。更奇怪的是,它在ie8上工作,在firefox和chrome浏览器上失败

我通过firefox中的firebug控制台进行了检查,发现以下错误:

TypeError: jQuery(...).jqGrid is not a function
我不明白为什么突然出现这个错误

我已包括以下文件:

<link rel="stylesheet" type="text/css" media="screen" href="jqgrid/themes/style.css" />
     <link rel="stylesheet" type="text/css" media="screen" href="jqgrid/themes/basic/grid.css" />
    <script src="jqgrid/js/jquery.js" type="text/javascript"></script>
    <script src="jqgrid/js/jquery.jqGrid.js" type="text/javascript"></script>
    <script src="jqgrid/js/myjqGrid.js" type="text/javascript"></script>

我无法将其更新为最新的jqGrid版本,因为我必须手动更改所有文件中的代码。另外,我使用的主题在jquery ui主题中不可用。

您写道,您的旧web应用程序“仍能在IE8上运行,在Firefox和Chrome浏览器上出现故障”

我认为它可以在IE上运行,因为你仍然像以前一样使用旧的IE8,但是你像以前一样将Firefox和Chrome更新到更新的版本。您使用的是5年前发布的jQuery 1.2.6,您使用的是2008年夏天发布的jqGrid 3.2.3。您应该了解,如果您想在新的现代web浏览器中使用web应用程序,您必须更新它

如果我们谈到2008年,你应该记得,当时的版本刚刚发布。InternetExplorer8于2009年发布。Chrome浏览器的首次发布甚至是在2008年底。现在我们有了Firefox21和Chrome27。你真的想知道你的复古应用程序在现代的网络浏览器中还能工作吗


关于您的代码:我对jqGrid的第一次体验是3.5.2版。所以我不确定jqGrid 3.2.3是如何工作的。至少jqGrid 3.5.2已经有本地化文件。因此,必须在
jquery.jqGrid.min.js
之前插入
grid.locale en.js
。也许你也应该在jqGrid 3.2.3中这样做?

它怎么会突然停止?这一定是因为你在jgGrid js文件中修改了代码。谢谢你回复rikesh,我没有修改任何代码。如果我已经改变了,那么为什么它在ie8上工作。感谢oleg的回复。我已经更新了jqGrid,它开始工作了。@PankajKhurana:不客气!只有使用最新(或几乎最新)版本的产品,才能获得开源的优势。在这种情况下,你将有更好的性能,新的尼斯免费功能,更好的支持和错误修复等。
jQuery(document).ready(function(){
jQuery("#superadmin").jqGrid({  // Specify the ID of the Grid Table
    url:'jqgrid/superadminusers.php', // URL of PHP file
    datatype: "json", // Name of datatype
    colNames:['User Id','First Name','Last Name', 'Role', 'Contact','Edit','Delete','Status'], // Column Name in grid
    colModel:[ // Field name used in database
        {name:'username',index:'username', width:100},
        {name:'firstname',index:'firstname', width:120},
        {name:'lastname',index:'lastname', width:100},
        {name:'role',index:'role', width:100},
        {name:'phone',index:'phone', width:80},
        {name:'editrow',index:'editrow', width:50},
        {name:'deleterow',index:'deleterow', width:50},
        {name:'deletebook',index:'deletebook', width:100}
    ],
    pager: jQuery('#divPage'), // ID of Grid DIV
    rowNum:10, // Total no of rows that we want to show in grid at a time
    mtype: "POST", // method type
    height: 200, // height of grid
    width: 850, // width of grid
    multiselect: false, // set true the multiselect property
    rowList:[10,15,20], // set the number of list of rows
    imgpath: 'jqgrid/themes/sand/images', // path of images
    sortname: 'username', // column name by which grid will be sorted by default
    viewrecords: true,  // it will show the number of records below the grid
    sortorder: "asc",
  caption:'Users'
    });
});