NetTalk Central
NetTalk Web Server => Web Server - Ask For Help => Topic started by: kevin plummer on November 26, 2009, 04:42:06 PM
-
Hi All,
I have various browses on different tabs. When I click on a record in one browse it needs to refresh the others as I have filters built in based on the record selected. So it is like child browses but as they are in different Tabs I need to use the method below to update.
I have setup on the Tab properties to refresh these browses when a record is clicked.
The problem I have is if I click the first record in the Browse no server side code is run and no browse refresh is done - I guess this record is already selected so it just ignores my click.
If I click the second record it all works fine and if I click record 1 again it all works fine. if there is only 1 record in a filtered browse then its child browse in another tab does not get updated.
Is there any workaround to this or a better way to achieve what I am trying to do?
Cheers,
Kevin
-
ok maybe my last post was too complicated. I've looked at all the code and I can't work it out.
Simply, how do I detect (and run code) if I click on an already selected record in a browse?
When I look at the log window nothing appears.
Is a variable set somewhere that detects if you are trying to click on record already selected to do nothing?
If click on a new record I get a bunch of stuff?
Cheers,
Kev
-
Hi Kevin,
Sorry for the delay in answering. It's not the question that's complicated, it's the answer.
In short, you shouldn't have to "refresh" when the same row is clicked, because the correct children should be populated in the first place.
However , yes, by editing the JavaScript in netweb.js, you can suppress the "don't refresh if clicking highlighted row" behavior. Bear in mind that after editing netweb.js you need to run the Gzipall bat file to rebuild all.js, and all.js.gz
specifically;
in netweb.js
search for
browseTable.prototype.cr = function (r,phf,s){
comment out the IF line (and it's closing bracket)
if (i != this.rowselected){
cheers
Bruce
-
Thanks Bruce I will give it a go.
"In short, you shouldn't have to "refresh" when the same row is clicked, because the correct children should be populated in the first place."
> The prob is that the children are in different tabs so I can't set them up as child browses in the templates - or can I?
-
Perfect!
BTW when I ran the GZIPALL.BAT all the zipped files eg all.js.gz files are zero bytes. I tested with the unzipped js.
-
did you have gzip.exe in the same folder as the batch file?
cheers
Bruce