Forum


08:42

08/09/2009

Dear All, I'm using the code at "Search Big Sets" from the demo site to perform local jqgrid reload, however the message "Loading" appeared on the grid, but the data is not reload...
I found that the variable is not passing to the report_data_xml.php when executing report_data_gridReload().
Any clues ? below is my html code. Thanks
==html==
<script type="text/javascript">
$(function(){
jQuery('#list6').jqGrid({
url:'report_data_xml.php',
datatype: 'xml',
mtype: 'GET',
sortable: true,
colNames:['EMAIL', 'PROVIDER', 'PROVIDER COUNTRY', 'BEGIN DATE', 'UNITS'],
colModel :[
{name:'EMAIL1', index:'EMAIL1', align:'center'},
{name:'PROVIDER', index:'PROVIDER', align:'center'},
{name:'PROVIDER_COUNTRY', index:'PROVIDER_COUNTRY', align:'center'},
{name:'BEGIN_DATE', index:'BEGIN_DATE', align:'right'},
{name:'UNITS', index:'UNITS', width:80, align:'right', formatter:'integer', formatoptions: {
thousandsSeparator: ","
}},
],
pager: '#pager6',
rowNum: 20,
rowList:[10,20,30,50,100],
height: 'AUTO',
sortname: 'BEGIN_DATE',
sortorder: 'asc',
gridview: true,
viewrecords: true,
caption: 'Report Data'
});
});
function report_data_gridReload(){
var report_date_from = $("#report_date_from").val();
var report_date_to = $("#report_date_to").val();
$("#list6").jqGrid('setGridParam',{url:"report_data_xml.php?report_date_from="+report_date_from+"&report_date_to="+report_date_to}).trigger("reloadGrid");
};
</script>
<body>
Date From: <input type="text" name="report_date_from" id="report_date_from" value="<?php echo $report_date_from; ?>">
To : <input type="text" name="report_date_to" id="report_date_to" value="<?php echo $report_date_to; ?>">
<input type="submit" value="Submit" onclick="return report_data_gridReload();">
<TABLE WIDTH=100% BORDER=1 CELLPADDING=4 CELLSPACING=3 STYLE="page-break-before: always">
<COL WIDTH=256*>
<TR>
<TD WIDTH=100% VALIGN=TOP>
<table id="list6" class="scroll" cellpadding="0" cellspacing="0"></table>
<div id="pager6" class="scroll" style="text-align:center;"></div>
</TD>
</TR>
</TABLE>
</body>
===end html====
19:35

Moderators
30/10/2007

Hello,
Check what you return from server in this case.
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.
09:02

Moderators
30/10/2007

Hello,
This is very strange. Also do you see in FireBug if the parameters are passed?
How do you obtain the reported data - from get or from post array.
If you use postData to send parameters, does this work.
$(”#list6″).jqGrid('setGridParam',{postData:{report_date_from:report_date_from,report_date_to:report_date_to}})
...
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.
Most Users Ever Online: 715
Currently Online:
52 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