Re: disable back button when using div's

2004-05-07 Thread cf coder
thank you guys for your help. I decided to go with the server option. I'm checking to see if the record already exists in the database. If he does, I'm just alerting/displaying a message. Thanks again for your help.

>cf coder said:
>>
>> I want to disable the 'back' button when the user sees
>> the confimation message. Is this possible, if yes can
>> somebody please show me.
>
>You can kludge some workarounds that will fool most browsers, but you
>can't reliably disable the back button. In *my* browser *I* decide
>whether *my* back button will work. You can do whatever you want on
>the server, like ignoring the second/third etc. submission of the
>form, because you control the server, but the client controls the
>browser.
>
>Jochem
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]




Re: disable back button when using div's

2004-05-05 Thread Jeremy Brodie
There have been a few forums on this list on diabiling back buttons. For better or worse there is always a way to activiate the back button that you did not know in a specic browser. Ditto the same for the browser's history.

Take Joachim's advice on this one (never a bad idea to begin with) and assume that someone will use the back button and trap the error!

Here are a few ideas you can consider on the server side:

1) Create a session variable if the person has added a record. When you have finished the process delete the session variable. If someone uses the back button, having the session variable in hand, you can now handle the situation.

2) When inserting data into the database, check to see if the information has been entered correctly into the database. If it has, then stop the database transaction.

3) Surround the transaction with cftry/cfcatch to check if someone is entering the form with the wrong information. If this is the case then someone is accessing the information through the browser's history.

Jeremy

>Hello everybody,
>
>I've read a lot about disabling the browser back
>button when a user submits a form where the action
>page is different from the submitting page.
>
>It is absolutely important that the user is stopped
>from going back a page because This is an application
>where authorised users can add new users
>
>Ok, here it goes. The super user fills in the new user
>form and submits the page. On form submission I'm
>displaying a confimation message. This is displayed
>inside a div tag.
>
>Here, this might help.
>
>
>form.hid_adduser neq "">
>	
>	
>	
>	
>	
>addtoken="no">
>
>
>
>
>
>
>
>height="205">
> 
>    
>	 	
>class="label">
>	  	Thank you for adding a new user. An email has been
>sent to the customer to advise.
>		
>	
> 
>
>
>
>
>
>
>
>
>value="#cgi.script_name#?#cgi.query_string#">
>
>  
>	
>  
>  
>    
>  
>
>
>
>
>
>
>I want to disable the 'back' button when the user sees
>the confimation message. Is this possible, if yes can
>somebody please show me.
>
>Best regards,
>cfcoder
>
>
>
>	
>		
>__
>Do you Yahoo!?
>Win a $20,000 Career Makeover at Yahoo! HotJobs  
>http://hotjobs.sweepstakes.yahoo.com/careermakeover
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]




Re: disable back button when using div's

2004-05-05 Thread Jochem van Dieten
cf coder said:
>
> I want to disable the 'back' button when the user sees
> the confimation message. Is this possible, if yes can
> somebody please show me.

You can kludge some workarounds that will fool most browsers, but you
can't reliably disable the back button. In *my* browser *I* decide
whether *my* back button will work. You can do whatever you want on
the server, like ignoring the second/third etc. submission of the
form, because you control the server, but the client controls the
browser.

Jochem
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]




disable back button when using div's

2004-05-05 Thread cf coder
Hello everybody,

I've read a lot about disabling the browser back
button when a user submits a form where the action
page is different from the submitting page.

It is absolutely important that the user is stopped
from going back a page because This is an application
where authorised users can add new users

Ok, here it goes. The super user fills in the new user
form and submits the page. On form submission I'm
displaying a confimation message. This is displayed
inside a div tag.

Here, this might help.


form.hid_adduser neq "">
	
	
	
	
	
addtoken="no">







height="205">
 
    
	 	
class="label">
	  	Thank you for adding a new user. An email has been
sent to the customer to advise.
		
	
 








value="#cgi.script_name#?#cgi.query_string#">

  
	
  
  
    
  






I want to disable the 'back' button when the user sees
the confimation message. Is this possible, if yes can
somebody please show me.

Best regards,
cfcoder

	
		
__
Do you Yahoo!?
Win a $20,000 Career Makeover at Yahoo! HotJobs  
http://hotjobs.sweepstakes.yahoo.com/careermakeover
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]