I am getting the jqGrid is not a function error but ONLY in Firefox 4 (both Mac and PC). Not in Firefox 3.6.16, Safari (latest), Chrome (latest), Opera (latest), IE8 or any other browser I tried.
The code worked fine previously and no code changes have been made. Additionally I am loading everything in the correct order. I upgraded to FF4 and immediately started getting this error:
jQuery("#mygridid").jqGrid is not a function
I have:
var pathtojsfiles = "/js/";
which is correct and my js loading order looks like this:
|
1 2 |
<div class="sfcode"><pre id="""""line1"""""><script type="text/javascript" src="<a href="/blog/"/blog/"/blog/"/blog/"/blog/view-source:http:/tioga:8888/js/jquery-1.4.2.min.js""""" target=""""_blank"""" target="_blank" rel="nofollow">/js/jquery-1.4.2.min.js"></script><br /> <script type="text/javascript" src="<a href="/blog/"/blog/"/blog/"/blog/"/blog/view-source:http:/tioga:8888/js/jquery-ui-1.8.1.custom.min.js""""" target=""""_blank"""" target="_blank" rel="nofollow">/js/jquery-ui-1.8.1.custom.min.js"></script> |
|
1 |
<script type="text/javascript" src="<a href="/blog/"/blog/"/blog/"/blog/"/blog/view-source:http:/tioga:8888/js/i18n/grid.locale-en.js""""" target=""""_blank"""" target="_blank" rel="nofollow">/js/i18n/grid.locale-en.js"></script> |
|
1 2 |
<script type="text/javascript" src="<a href="/blog/"/blog/"/blog/"/blog/"/blog/view-source:http:/tioga:8888/js/jquery.jqGrid.js""""" target=""""_blank"""" target="_blank" rel="nofollow">/js/jquery.jqGrid.js"></script><br /> <script type="text/javascript" src="<a href="/blog/"/blog/"/blog/"/blog/"/blog/view-source:http:/tioga:8888/js/ajaxupload.js""""" target=""""_blank"""" target="_blank" rel="nofollow">/js/ajaxupload.js"></script> |
jqGrid itself is called by a script included in the page that uses it and I have tried everything from placing that code at the bottom of the file to using a delayed loading method available in the framework I am using (Zend Framework) to force the code that calls jqGrid to load absolutely last. Nothing works.
Remember, this works fine in every browser I could find, even Firefox 3.6.16, it only happens in Firefox 4. Any ideas?
Solution (thanks to Oleg) is to edit the way the various js files are included in the loader… jquery.jqGrid.js
I changed the various browser specific loading methods to a basic:
document.writeln("");
and that fixed it.
Copyright 2014 TriRand LtdAll Rights ReservedRSS
Back to Top