Forum

November 2nd, 2014
A A A
Avatar

Lost password?
Advanced Search

— Forum Scope —




— Match —





— Forum Options —





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

The forums are currently locked and only available for read only access
sp_Feed Topic RSS sp_TopicIcon
Grid only loads in IE6
02/02/2010
08:45
Avatar
Jimbo
Member
Members
Forum Posts: 5
Member Since:
01/02/2010
sp_UserOfflineSmall Offline

jqQgrid isn't loading using IE7, FF or Safari. However, it loads under IE6. How unusual!

I loaded it up with Firebug and found that all the CSS files and Javascript files are being loaded. Also, there are no Javascript errors thrown. Am I missing something obvious?

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DT.....t;&gt;
<html xmlns="http://www.w3.org/1999/xhtml&q.....t;&gt;
  <head>
    <meta http-equiv="Content-Type" content="text/html;.charset=iso-8859-1" />
    <meta http-equiv="Content-Language" content="en-us" />
    <title>My App</title>
    <link href="/myapp/stylesheets/cupertino/jquery-ui-1.7.2.custom.css" media="screen" rel="stylesheet" type="text/css" />
    <link href="/myapp/stylesheets/ui.jqgrid.css" media="screen" rel="stylesheet" type="text/css" />
    <script src="/myapp/javascripts/jquery-1.4.min.js" type="text/javascript"></script>
    <script src="/myapp/javascripts/jquery-ui-1.7.2.custom.min.js" type="text/javascript"></script>
    <script src="/myapp/javascripts/i18n/grid.locale-en.js" type="text/javascript"></script>
    <script src="/myapp/javascripts/jquery.jqGrid.min.js" type="text/javascript"></script>
    <script type="text/javascript">
      /*
       *
       */
      jQuery(document).ready(function(){
          var mygrid = jQuery("#list").jqGrid({
            loadBeforeSend: function(xhr){
              xhr.setRequestHeader("Authorization", "Basic ZGV2cm9pOnBhc3N3b3Jk");
            },
            url:'http://myurl/my-other-app/grid.....s&#39;,
            datatype: 'xml',
            mtype: 'GET',
            colNames:['Foo','Bar', 'Baz'],
            colModel :[
              {name:'foo', index:'foo', width:200, sortable:false},
              {name:'bar', index:'bar', width:200, sortable:false},
              {name:'baz', index:'baz', width:400, sortable:false}
            ],
            pager: '#pager',
            emptyrecords: "Nothing to display",
            rowNum:500,
            rowList:[100,250,500,1000],
            sortname: 'foo',
            sortorder: 'asc',
            viewrecords: true,
            caption: 'My Grid'
          });
          jQuery("#list").jqGrid('navGrid','#pager',{edit:false,add:false,del:false,search:false,refresh:false});
          jQuery("#list").jqGrid('navButtonAdd',"#pager",{caption:"Search",title:"Search",buttonicon :'ui-icon ui-icon-search', onClickButton:function(){ mygrid[0].triggerToolbar() } });
          jQuery("#list").jqGrid('navButtonAdd',"#pager",{caption:"Clear Search",title:"Clear Search",buttonicon :'ui-icon-refresh', onClickButton:function(){ mygrid[0].clearToolbar() } });
          jQuery("#list").jqGrid('filterToolbar', {
             autosearch: false,
             beforeSearch: function() {
               if(jQuery('#gs_foo').attr('value').length > 20)
               {
                  alert("The 'Foo' search value must be 20 characters or less.");
                  jQuery('#gs_foo').focus();
                  jQuery('#gs_foo').select();
                  return true; // prevent the lookup
               }
               else
               {
                  return false; // allow the lookup
               }
             }
          })
      });
    </script>
  </head>
  <body>
    <div id="container">
      <table id="list"></table>
      <div id="pager"></div>
    </div>
  </body>
</html>

Thanks for the help!

02/02/2010
20:23
Avatar
Jimbo
Member
Members
Forum Posts: 5
Member Since:
01/02/2010
sp_UserOfflineSmall Offline

What are the constraints around the "url" parameter?

I've found that the grid will populate with items in the modern browsers when I have the url parameter set to localhost:8080 -

Grid at location: http://localhost:8080/app1/grid

URL parameter: http://localhost:8080/app2/items

However, when I deploy to my Dev system, and I use the name of that machine, the grid no longer populates -

Grid at location: http://my.machine.net:8080/app1/grid

URL parameter: http://my.machine.net:8080/app2/items

Same machine. Same domain. Same port. No grid items..

Thanks!

02/02/2010
20:25
Avatar
Jimbo
Member
Members
Forum Posts: 5
Member Since:
01/02/2010
sp_UserOfflineSmall Offline

I should clarify and say that everything still works fine using IE6 on both systems. Meaning http://my.machine.net:8080/app2/items does return valid XML data when it receives a request.

02/02/2010
21:07
Avatar
Jimbo
Member
Members
Forum Posts: 5
Member Since:
01/02/2010
sp_UserOfflineSmall Offline

It looks like this is a SSL to non-SSL issue which still causes a cross domain Ajax call even though they are on the same server. Now, does the URL paramter allow for https connections?

05/02/2010
11:50
Avatar
tony
Sofia, Bulgaria
Moderator
Members

Moderators
Forum Posts: 7721
Member Since:
30/10/2007
sp_UserOfflineSmall Offline

Hello,

The url parameter is just url which is used in jQuery ajax call.

For more info refer here:

http://api.jquery.com/jQuery.ajax/

You can just thest this when you use your own ajax request to get the data.

Just try it - the result will be the same.

Best Regards

Tony

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.

Forum Timezone: Europe/Sofia

Most Users Ever Online: 715

Currently Online:
73 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.com

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

Administrators: admin: 66

Comments are closed.
Privacy Policy   Terms and Conditions   Contact Information