you really can't stop them from using the back button.  javascript won't let
you touch the "chrome" stuff on a non-js generated window.  even if you
could stop the button itself, they could right-click in the window and
select back, or do a few other things.

chris olive, cio
cresco technologies
[EMAIL PROTECTED]
http://www.crescotech.com



-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Friday, April 13, 2001 12:07 AM
To: CF-Talk
Subject: RE: disabling back or second insert


Might as well chime in....

What I do is set a hidden variable in the form, usually a time/date or
random number (depends on how I'm feeling!). That variable is created on the
first page of the form. It can be carried through countless form pages, but
the user hits the submit and an insert is to be performed, I query the db
for a record with that variable, if it already exists, it is presumed this a
duplicate entry attempt, and the insert is not performed. Sometimes I even
spit our a little message like "Yeah Yeah we got it the first time you hit
submit!" that sorta thing.

The only really drawback to this is if the user hit the back button to make
changes to his form entry, they will never be submitted.

I would prefer the abilty to kill the back. How are some of you doing this
with Javascript?

Brian

-----Original Message-----
From: Christopher Olive, CIO [mailto:[EMAIL PROTECTED]]
Sent: Thursday, April 12, 2001 3:52 PM
To: CF-Talk
Subject: RE: disabling back or second insert


why not move the check to the action form?  that way they can enter the data
all they want, and click submit all they want.  it won't insert the data if
someone by that name's already there.

chris olive, cio
cresco technologies
[EMAIL PROTECTED]
http://www.crescotech.com



-----Original Message-----
From: Smith, Daron [mailto:[EMAIL PROTECTED]]
Sent: Thursday, April 12, 2001 9:17 AM
To: CF-Talk
Subject: disabling back or second insert


I have a registration form, that queries initially to make sure that the
registrant is not already registered, so it eliminates people from
registering more than one time if they come back to the site, however if
they submit the form and do not think anything has happened, they can use
their back button, hit the submit button and the query does another insert
and I end up with multiple records in my DB.  What is the best way of
keeping them from doing this?  An expiring cookie? Or is there javascript to
eliminate the ability to go back?

Thanks

Daron J. Smith



Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to