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.

<cfif isDefined("form.hid_adduser") and
form.hid_adduser neq "">
<!--- code to add the user in the database starts
here --->

<!--- code to add the user in the database ends here
--->

<CFLOCATION URL=""> addtoken="no">
</cfif>

<cfif isDefined("url.callAdded")>
<body>
<div id="confirmdiv" style="z-index:2;
position:absolute; left:35px; top:90px; width:650px;
display:block">
<cfoutput>
<table border="0" align="center" width="355"
height="205">
<tr>
    <td valign="bottom">
<div style="position:relative; left:15px; top:1px;"
class="label">
   Thank you for adding a new user. An email has been
sent to the customer to advise.
</div>
</td>
</tr>
</table>
</cfoutput>
</div>
</body>
<cfelse>
<body>
<form name="addUserFrm" method="post" action=""> <cfoutput><input type="hidden" name="returnto"
value="#cgi.script_name#?#cgi.query_string#"></cfoutput>
<table border="0" cellpadding="0px" cellspacing="3px">
  <tr>
<td><input name="newuser" type="text"></td>
  </tr>
  <tr>
    <td><input type="submit" name="addUser" value="Add
User"></td>
  </tr>
</table>
<input type="hidden" name="hid_adduser" value="">
</form>
</body>
</cfif>

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]

Reply via email to