Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 6 of 6
  1. #1
    New to the CF scene
    Join Date
    Jan 2010
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    records duplicating on back arrow.

    When my testers decide they don't want to be on a particular page and use the browsers 'back arrow' to go back to the previous page, they often press the SUBMIT button again. There is no unique field in these records except the recID number that SQL assigns them, so I end up with two identical records, with consecutive ID's. IS there a simple way out of this trap? Can I tell if I came there thru a 'back arrow'? Or will I have to add a timer that won't allow updating a record twice within a certain period of time?

    thanks

  • #2
    Senior Coder
    Join Date
    Jul 2009
    Location
    South Yorkshire, England
    Posts
    2,318
    Thanks
    6
    Thanked 304 Times in 303 Posts
    You can disable the button via javascript, (dependant upon javascript being enabled in the browser, obviously), or else go down the time limit route you mention.

  • #3
    Supreme Master coder! abduraooft's Avatar
    Join Date
    Mar 2007
    Location
    N/A
    Posts
    14,861
    Thanks
    160
    Thanked 2,223 Times in 2,210 Posts
    Blog Entries
    1
    There is no unique field in these records except the recID number that SQL assigns them, so I end up with two identical records, with consecutive ID's. IS there a simple way out of this trap?
    Can't you add a unique field(or group of fields) then?
    The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)

  • #4
    New to the CF scene
    Join Date
    Jan 2010
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by MattF View Post
    You can disable the button via javascript, (dependant upon javascript being enabled in the browser, obviously), or else go down the time limit route you mention.
    Matt - Do u mean the SUBMIT or the LAST PAGE button?

    thanks,
    Tig

  • #5
    New to the CF scene
    Join Date
    Jan 2010
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by abduraooft View Post
    Can't you add a unique field(or group of fields) then?
    I don't see how at the moment, but thanks for the help.

  • #6
    Senior Coder
    Join Date
    Jul 2009
    Location
    South Yorkshire, England
    Posts
    2,318
    Thanks
    6
    Thanked 304 Times in 303 Posts
    Quote Originally Posted by therealtigger View Post
    Matt - Do u mean the SUBMIT or the LAST PAGE button?

    thanks,
    Tig
    Submit.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •