Forum

May 22nd, 2014
A A A

Please consider registering
guest

Log In Register

Register | Lost password?
Advanced Search

— Forum Scope —

  

— Match —

   

— Forum Options —

    

Minimum search word length is 4 characters - maximum search word length is 84 characters

Topic RSS
4.1.2 error: b.jgrid.jqID is not a function
30/09/2011
04:48
yeecn
Member
Forum Posts: 5
Member Since:
29/09/2011
Offline

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>

30/09/2011
05:11
yeecn
Member
Forum Posts: 5
Member Since:
29/09/2011
Offline

The example was take from jqGrid Wiki - xmlstring

http://www.trirand.com/jqgridw.....eving_data

30/09/2011
09:39
tony
Sofia, Bulgaria
Moderator
Forum Posts: 7693
Member Since:
30/10/2007
Offline

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 PHP, ASP.NET and ASP.NET MVC visit us at our commercial products site - trirand.net - by the very same guys that created jqGrid.
30/09/2011
09:42
tony
Sofia, Bulgaria
Moderator
Forum Posts: 7693
Member Since:
30/10/2007
Offline

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 PHP, ASP.NET and ASP.NET MVC visit us at our commercial products site - trirand.net - by the very same guys that created jqGrid.
30/09/2011
10:02
yeecn
Member
Forum Posts: 5
Member Since:
29/09/2011
Offline

Oh my.... I forgot all about the ordering of the .js

Perhaps it pays to highlight it in install.txt

Thanks very much for your help.

Regards,

Chut

Forum Timezone: Europe/Sofia

Most Users Ever Online: 215

Currently Online:
35 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

OlegK: 1233

markw65: 179

kobruleht: 144

phicarre: 132

YamilBracho: 124

Renso: 118

Member Stats:

Guest Posters: 447

Members: 11327

Moderators: 2

Admins: 1

Forum Stats:

Groups: 1

Forums: 8

Topics: 10536

Posts: 31143

Newest Members: iQuis, Farooq Tahir, s2e_grid, Ron, ranjansudeep12, songcon2

Moderators: tony: 7693, Rumen[Trirand]: 81

Administrators: admin: 61

Comments are closed.
Privacy Policy   Terms and Conditions   Contact Information