NetTalk Central

Author Topic: Page reload  (Read 3452 times)

alex.kolaric

  • Full Member
  • ***
  • Posts: 151
  • Do it or do not, there is no try
    • View Profile
    • Email
Page reload
« on: September 20, 2010, 10:07:07 AM »
Hi,

is there any way to detect if the page was reloaded using browser Reload button instead of requested from a regular link on another page? For example, loading of the page with some parameter causes adding of new row in a table, if reload button is pressed new row is added one more time.

thanks,
Alex

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11251
    • View Profile
Re: Page reload
« Reply #1 on: September 22, 2010, 12:03:40 AM »
you could add a random number to the url, then when you add the record test to see if the random number is in a "recently used" list.

Cheers
Bruce

alex.kolaric

  • Full Member
  • ***
  • Posts: 151
  • Do it or do not, there is no try
    • View Profile
    • Email
Re: Page reload
« Reply #2 on: September 22, 2010, 12:37:30 AM »
Hi Bruce,

I solved it by adding random number to URL as parameter and then setting session variable in the called procedure to the value of that parameter. This way I can always check if the parameter value is equal to the session variable and if so skip the process of record adding again. This solves the issue of reload button although it incurs some more coding.

thanks,
Alex