...

View Full Version : records duplicating on back arrow.



therealtigger
01-31-2010, 01:40 AM
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

MattF
01-31-2010, 08:51 AM
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.

abduraooft
01-31-2010, 02:24 PM
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?

therealtigger
01-31-2010, 06:24 PM
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

therealtigger
01-31-2010, 06:27 PM
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.

MattF
01-31-2010, 10:57 PM
Matt - Do u mean the SUBMIT or the LAST PAGE button?

thanks,
Tig

Submit.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum