NetTalk Central

Author Topic: After Browse Row Clicked  (Read 4695 times)

kevin plummer

  • Hero Member
  • *****
  • Posts: 1195
    • View Profile
    • Production Accounting and Software Payroll
After Browse Row Clicked
« 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

kevin plummer

  • Hero Member
  • *****
  • Posts: 1195
    • View Profile
    • Production Accounting and Software Payroll
Re: After Browse Row Clicked
« Reply #1 on: December 02, 2009, 04:51:51 AM »
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

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: After Browse Row Clicked
« Reply #2 on: December 02, 2009, 10:59:31 PM »
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


kevin plummer

  • Hero Member
  • *****
  • Posts: 1195
    • View Profile
    • Production Accounting and Software Payroll
Re: After Browse Row Clicked
« Reply #3 on: December 03, 2009, 03:55:12 AM »
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?

kevin plummer

  • Hero Member
  • *****
  • Posts: 1195
    • View Profile
    • Production Accounting and Software Payroll
Re: After Browse Row Clicked
« Reply #4 on: December 03, 2009, 04:33:11 AM »
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.

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: After Browse Row Clicked
« Reply #5 on: December 03, 2009, 05:52:34 AM »
did you have gzip.exe in the same folder as the batch file?

cheers
Bruce