Re: having a page expire *revisited*
by Kukla Fran and Ollie <weblists2001(at)yahoo.com>
|
Date: |
Wed, 10 Apr 2002 20:40:27 -0700 |
To: |
hwg-servers(at)hwg.org |
Cc: |
CHarris(at)checkfree.com |
In-Reply-To: |
checkfree |
|
todo: View
Thread,
Original
|
|
JavaScript won't work the way you want. It is *not* a programming language.
Take a step back from the technology, look at the larger picture and be
guided by the KISS Principle.
This is one suggestion I came up with using a standard Perl script and a
web form page.
Standard Scenario You Want To Avoid
1) Customer completes a web form with JavaScript validation (as they
complete the form) -- page1.html -- and press the submit button.
2) Perl performs transaction.
3) Perl script sends customer to a generic thank-you page -- page2.html
4) End of story.
Any user can press the back button while at page2.html and return to
page1.html. You said you do not want this. The META tags you listed don't
work. Of course not because they apply to a different issue.
So we try a trick ...
New Way Of Doing Things
1) Customer completes a web form with JavaScript validation (as they
complete the form) -- page1.html -- and press the submit button.
2) Perl performs transaction.
3) Perl sends customer to an intermediate page -- page2.html. This page
consists only of <.head> information, specifically this META tag -- <.META
HTTP-EQUIV="Refresh" CONTENT="0;URL=http://www.sameurl.com/page3.html">
4) Intermediate page sends customer on to page3.html.
5) If customer hits BACK button, they go back only to page2.html where
META tag cuts in and sends them back to where they belong - page3.html.
6) End of story.
Of course, if the customers is a nifty-swifty, they hit the BACK button
twice in rapid succession and get back to page1.html. Them's the breaks.
Other Scenario
1) You create an advanced Perl script which does all this automatically.
2) You write the form in ASP that does this same advanced scripting.
3) You write the form in PHP that does this same advanced scripting.
4) You write the form in CF that does this same advanced scripting.
5) Yadda, yadda.
Kukla
At 07:34 PM 4/10/02 -0500, CHarris(at)checkfree.com wrote:
>greetings all:
>
>i have an html form that after someone hits the 'submit' button returns an
>acknowledgement page. i want to prevent someone from being able to hit
>their browser's back button and returning to the form.
>
>i have tried the following with no luck: (browser info is IE version 6.0)
>
><META HTTP-EQUIV="pragma" CONTENT="no-cache">
><META HTTP-EQUIV="Expires" CONTENT="0">
>
>i'm also using JavaScript for form validation. is there a way with
>JavaScript to prevent this?
>
>thanks in advance,
>
>
>Chris Harris, MCSE
>Software Engineer Transmissions/Translations
>Process Improvement Team
>Office 512-377-6170
>Text Page 5612876(at)skytel.com
>Num Page 888-561-2876
_________________________________________________________
Do You Yahoo!?
Get your free (at)yahoo.com address at http://mail.yahoo.com
HWG: hwg-servers mailing list archives,
maintained by Webmasters @ IWA