Forum


07:28

13/01/2009

By following the tutorial on master detail grid, I able to make it run perfectly.
However, when I want to combine this existing master detail with the text box +search button function, it is not working. No error is shown. In this case, how to debug?
Codes I add in to the existing master detail 's html page:
var timeoutHnd;
var flAuto = false;
function doSearch(ev){...}
function gridReload(){...}
function enableAutosubmit(state){...}
var nm_mask = jQuery("#item_nm").val();
var cd_mask = jQuery("#search_cd").val();
alert(nm_mask); alert(cd_mask);
Whenever I click search button, red bar will load, the grid will refresh, but data not changing at all.
When I debug the js code, it shows the value as expected.
If I add in this line, then both the master and detail grid will be blank--> mtype: "POST",
I'm not sure which part is facing problem.
How to debug?
when I click on the search button in html page, it will call the master grid php page, pass in parameter.
I have no idea what is whole data that passed in, and returned from php page.
If I directly open up master grid php page, then I have no way to trace what is missing on the road. I have to open up the html page to call to the master grid php page...
Tony, any way to trace? Any idea on what's missing?
07:36

13/01/2009

after few hours line by line tracing, finally found the solution to this.
Basically few lines of code need to change in order for it to work
In master grid php page,
//version 1 not working
//$start = $limit*$page - $limit;
//version 2 works in any cases
if ($limit<0) $limit = 0;
$start = $limit*$page - $limit;
if ($start<0) $start = 0;
Most Users Ever Online: 715
Currently Online:
76 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