Smart questions
Smart answers
Smart people
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Member Login




Remember Me
Forgot Password?
Join Us!

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips now!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

Join Tek-Tips
*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Donate Today!

Do you enjoy these
technical forums?
Donate Today! Click Here

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.
Jobs from Indeed

Link To This Forum!

Partner Button
Add Stickiness To Your Site By Linking To This Professionally Managed Technical Forum.
Just copy and paste the
code below into your site.

g2000 (Programmer) (OP)
21 Sep 05 10:29
Is that possible to detect if a page goes back(history.back()) using javascript?

LFI (Programmer)
21 Sep 05 10:42
What exactly are you trying to do?  Are you trying to prevent someone going back to avoid accidental submission of the same form twice?  ...or... what?

--Dave
g2000 (Programmer) (OP)
21 Sep 05 11:28
I have 2 pages, input.asp & error.asp

input.asp has 3 textboxes.  When this page is first loaded, all textboxes are disabled.  They have to enable (press a button) and edit before submit.  

On top of input.asp, error checking is done.  If error(s) is/are found, the page is redirect
response.redirect("error.asp").  

A back button is in error.asp.  So user can go back.  The good thing about the back(history.back() ) is that it retains old values.  I mean those erroneous input.  But the textbox are still disabled.  

How to enable those?..  I mean how to distinguish between page when it is first loaded and page that is (go back) from error.asp?
LFI (Programmer)
21 Sep 05 11:58
Do you need form elements on the input.asp page to be filled in with the values previously entered?

I am trying all sorts of tests and can't figure out anything right now.  

My instinct, then, is to make your 'back' button on the error.asp page call a function which actually goes forward, calling input.asp with a URL parameter (e.g., document.location = 'input.asp?dis=F';), catch that in the input.asp page and use the BODY tag's onload event to UNDISABLE certain form elements if the URL parameter value was F.

Anyone else?

--Dave

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Back To Forum

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close