Forum


06:27

09/01/2010

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
21:01

Moderators
30/10/2007

Hello,
Karthick, I have answer of your question - please revise your code.
Also do not put this problem N times in different posts - please
Regards
Tony Tomov
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.
19:53

Moderators
30/10/2007

$(document).ready(addClickHandlers);
function addClickHandlers() {
$(”a.remoteView”, this).click(function() {
$(”#displayDIV”).load(”workorder.jsp”, addClickHandlers);
});
}
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.
Most Users Ever Online: 715
Currently Online:
56 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.comModerators: tony: 7721, Rumen[Trirand]: 81
Administrators: admin: 66