Forum

July 10th, 2011
You must be logged in to post Login Register

Search Forums:


 






4.1.2 error: b.jgrid.jqID is not a function

No Tags
UserPost

04:48
30/09/2011


yeecn

Member

posts 5

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
30/09/2011


yeecn

Member

posts 5

The example was take from jqGrid Wiki – xmlstring

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

09:39
30/09/2011


tony

Sofia, Bulgaria

Moderator

posts 7387

Post edited 09:40 – 30/09/2011 by tony


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.

09:42
30/09/2011


tony

Sofia, Bulgaria

Moderator

posts 7387

Post edited 09:43 – 30/09/2011 by tony


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.

10:02
30/09/2011


yeecn

Member

posts 5

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

No Tags

About the jQuery Grid Plugin – jqGrid forum

Most Users Ever Online:

215


Currently Online:

100 Guests

Forum Stats:

Groups: 1

Forums: 7

Topics: 10277

Posts: 30372

Membership:

There are 11043 Members

There have been 448 Guests

There is 1 Admin

There are 2 Moderators

Top Posters:

OlegK – 1210

markw65 – 179

kobruleht – 144

phicarre – 132

YamilBracho – 124

Renso – 118

Administrators: admin (60 Posts)

Moderators: tony (7387 Posts), Rumen[Trirand] (81 Posts)




Comments are closed.
Privacy Policy   Terms and Conditions   Contact Information