Forum
04:48
29/09/2011
Firefox reported the following error:
Error: b.jgrid.jqID is not a function
Source File: https://www.b2k.com/b2k/js/jqGrid-4.1.2/js/jquery.jqGrid.min.js
Line: 74
The page is as follows (jsp):
<HTML>
<HEAD>
<link type="text/css" href="${pageContext.request.contextPath}/js/jquery-ui-1.8.16/css/ui-lightness/jquery-ui-1.8.16.custom.css" rel="Stylesheet" />
<script type="text/javascript" src="${pageContext.request.contextPath}/js/jqGrid/jquery-1.5.2.min.js"></script>
<link type="text/css" href="${pageContext.request.contextPath}/js/jqGrid-4.1.2/css/ui.jqgrid.css" rel="Stylesheet" />
<script type="text/javascript" src="${pageContext.request.contextPath}/js/jqGrid-4.1.2/js/jquery.jqGrid.min.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath}/js/jqGrid-4.1.2/js/i18n/grid.locale-en.js"></script>
<script>
var mystr =
"<?xml version='1.0' encoding='utf-8'?><invoices><rows><row>"
+ "<cell>data1</cell><cell>data2</cell><cell>data3</cell><cell>data4</cell><cell>data5</cell><cell>data6</cell>"
+ "</row></rows></invoices>";
jQuery(document).ready(function(){
jQuery("#list").jqGrid({
datatype: 'xmlstring',
datastr : mystr,
colNames:['Inv No','Date', 'Amount','Tax','Total','Notes'],
colModel :[
{name:'invid', index:'invid', width:55, sorttype:'int'},
{name:'invdate', index:'invdate', width:90, sorttype:'date', datefmt:'Y-m-d'},
{name:'amount', index:'amount', width:80, align:'right', sorttype:'float'},
{name:'tax', index:'tax', width:80, align:'right', sorttype:'float'},
{name:'total', index:'total', width:80, align:'right', sorttype:'float'},
{name:'note', index:'note', width:150, sortable:false} ],
pager: '#pager',
rowNum:10,
viewrecords: true,
caption: 'My first grid'
});
});
</script>
</HEAD>
<BODY>
<table id="list"></table>
<div id="pager"></div>
</BODY>
</HTML>
05:11
29/09/2011
The example was take from jqGrid Wiki - xmlstring
09:39
Moderators
30/10/2007
Hello,
I'm not sure if the example is taken from the wiki.
You problem is that the locale file (grid.locale-en.js) should be loaded before the grid file (jquery.jqGrid.min.js).
This situation is very clear described into the wiki docs
Regards
For professional UI suites for Java Script and PHP visit us at our commercial products site - guriddo.net - by the very same guys that created jqGrid.
09:42
Moderators
30/10/2007
Hello again.
More over your example will not work in IE based browsers.
Please set a DOCTYPE too.
Also please read carfully the docs and try to understand them.
Here is the right link to the wiki
http://www.trirand.com/jqgridw.....to_install
Regards
For professional UI suites for Java Script and PHP visit us at our commercial products site - guriddo.net - by the very same guys that created jqGrid.
Most Users Ever Online: 715
Currently Online:
48 Guest(s)
Currently Browsing this Page:
1 Guest(s)
Top Posters:
OlegK: 1255
markw65: 179
kobruleht: 144
phicarre: 132
YamilBracho: 124
Renso: 118
Member Stats:
Guest Posters: 447
Members: 11373
Moderators: 2
Admins: 1
Forum Stats:
Groups: 1
Forums: 8
Topics: 10592
Posts: 31289
Newest Members:
, razia, Prankie, psky, praveen neelam, greg.valainis@pa-tech.comModerators: tony: 7721, Rumen[Trirand]: 81
Administrators: admin: 66