NetTalk Central

Author Topic: Difference betweeen user clicked on a row and User clicked change button (on row  (Read 3161 times)

Rene Simons

  • Hero Member
  • *****
  • Posts: 649
    • View Profile
Hi,

In my app I have a browse where I can click the row OR click the change button in the same row.
At this moment is the case that when I click the button the CallClicked routine is executed before the update procedure is called.
I know this because I let the CallClicked routine do a GenerateBrowse, of which I see the result just before the update form appears.

Question: Is there a way to determine the button click from the row click and process them as mutually exclusive.

Cheers,
Rene
Rene Simons
NT14.14

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11186
    • View Profile
Hi Rene,

>> In my app I have a browse where I can click the row OR click the change button in the same row.

From a JavaScript perspective, clicking the button selects the row at the same time.
This translates into 2 JavaScript requests from the browser to the server, and they can be executed on the server in "any order". You cannot reply on the order being the same from one click to the next.

>> I know this because I let the CallClicked routine do a GenerateBrowse,

this is likely the root of your problem.

>> of which I see the result just before the update form appears.

it will appear independent of the form appearing. In production it might update the browse in the background behind the form.

>> Question: Is there a way to determine the button click from the row click and process them as mutually exclusive.

nope.

cheers
Bruce


Rene Simons

  • Hero Member
  • *****
  • Posts: 649
    • View Profile
Hi,

Thanks.
That last one is the one I dreaded the most.
Do you have any clues for me on the Javascript that's fired in both cases or will any effort be wothless here?

Ren
Rene Simons
NT14.14

Rene Simons

  • Hero Member
  • *****
  • Posts: 649
    • View Profile
Hi Bruce,

I haven't let your "nope" anwer (two replies ago) discourage me in this case, because I really needed a solution here .
I checked the Webserver Window to see if there are any differences between just clicking the line and clicking the Change button and noticed that the _column_ var
made the difference.
When the user does not click the button _column_  is 1 and when he/she does, the value of _column_ is 2 (that's the column where the change button is).

The part of the code that I don't want to execute when the change button is clicked, is now conditioned by : if p_web.getvalue('_column_') <> 2

Cheers,
Rene
Rene Simons
NT14.14

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11186
    • View Profile