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 loading slowly
13/01/2010
06:28
Avatar
rnkr09
Member
Members
Forum Posts: 20
Member Since:
09/01/2010
sp_UserOfflineSmall Offline

Hi i have two tabs where first tab is my default tab. when i click 2nd tab i load an external jsp page through a script 

$(document).ready(addClickHandlers);

function addClickHandlers() {

$(”a.remoteView”, this).click(function() {

$(”#displayDIV”).load(”workorder.jsp”, addClickHandlers);

});

}

Now the work order jsp file loads a grid data using xml response it gets from a servlet specified in the url:property of jqgrid. Now the problem is the grid take about 20 – 30 seconds to load which i consider is very long. How can i reduce the time it takes to load the grid.

The workorder code is

$(document).ready(function(){

jQuery(”#list”).jqGrid({

url: '/ams/servlet/getXmlData?q=1',

datatype: “xml”,

  colNames:['Complaint No.','Apt. No.', 'Name', 'C_Nature','C_Desc','Phone','E-Mail','Status','Regd. On','Regd. By'],

  colModel:[

    {name:'cno',index:'1',width:130,editable:true,editoptions:{readonly:true}},

    {name:'ano',index:'2',width:100,editable:true,editoptions:{readonly:true}},

    {name:'name',index:'3',width:100,editable:true,editoptions:{readonly:true}},

    {name:'cn',index:'4',width:100,editable:true,editoptions:{readonly:true}},

    {name:'cd',index:'5',width:100,sortable:false,editable:true,edittype:"textarea", editoptions:{rows:"10",cols:"50"}},

    {name:'ph',index:'6',width:100,editable:true,editoptions:{readonly:true}},

    {name:'mail',index:'7',width:100,sortable:false,editable:true,editoptions:{readonly:true}},

 {name:'states',index:'8',width:100,editable:true,edittype:"select",editoptions:{value:"open:Open;close:Closed"}},

  {name:'ron',index:'9',width:100,editable:true,editoptions:{readonly:true}},

  {name:'rby',index:'10',width:100,editable:true,editoptions:{readonly:true}},

  ],

rowNum:10,

autowidth: true,

rowList:[10,20,30],

pager: jQuery('#display'),

sortname: '1',

viewrecords: true,

sortorder: “desc”,

loadonce: true,

caption: “Work Order”

  });

});

Regards,

Karthick

13/01/2010
17:48
Avatar
tony
Sofia, Bulgaria
Moderator
Members

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

Hello,

Not sure what you try, but if you use standlone grid without to load in tabs - do you have this problem.

Also I do not know the code, but I thinkl you are in infinite recusrion with this script.

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.

14/01/2010
14:25
Avatar
rnkr09
Member
Members
Forum Posts: 20
Member Since:
09/01/2010
sp_UserOfflineSmall Offline

hi! yes when i load the grid in standalone page it works perfectly in all browsers and loads fast.

but when i use the grid to load in tabs it takes longer time to load and is not working in firefox and chrome.

i use the following code to load the workorder.jsp file which has the grid.

$(document).ready(addClickHandlers);

function addClickHandlers() {

$(”a.remoteView”, this).click(function() {

$(”#displayDIV”).load(”workorder.jsp”, addClickHandlers);

});

}

when i click the link <a> tag with class remoteView it loads the grid page in the div container with id "displayDIV"

is there any way to solve this problem. please help me.

Regards,

Karthick

Forum Timezone: Europe/Sofia

Most Users Ever Online: 715

Currently Online:
63 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