Rather use $cgi->redirect in ur perlscript which processes this form.
Main Topics
Browse All TopicsI am trying to return back to original page upon submit to a perl script. I was using:
<meta HTTP-EQUIV="Refresh"CONTEN
This works fine for first submission, but fails on sequent submissions during the same session.
Is there another method for returning the user back one or two pages after submiting to a perl script?
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Biffo,
"..<meta HTTP-EQUIV="Refresh"CONTEN
The javascript approach has some disadvantages to it.
1) what happens if the user has disabled javascript in the browser?
2) what happens if the user bookmarks the page, closes the browser, re-opens the browser, visits the bookmarked page. where will the above code take the user to??
3) what if the above link is embedded in another HTML page?
"..Is there another method for returning the user back one or two pages after submiting to a perl script? .."
there is a way one can go one page back, using PERL and hidden variables. this method, though not 100% accurate, would involve modifying the PERL script and would be better that the javascript approach.
here is how it would work.
lets say your PERL script is called by xyz.html.
you use the HTTP_REFERER variable and get the complete location of the page (xyz.html) that called this PERL script.
The PERL script does some processing and throws an output page. This page has a HTML form with the name of the HTML page (xyz.html) as a hidden HTML element and the "Back to the html page" as a submit button.
That way when you click on the "Back to the html page" button, the hidden variable is passed to your another PERL script, that would just redirect you to the page!!
Hope that helps.
Business Accounts
Answer for Membership
by: chris18Posted on 2000-09-26 at 06:01:40ID: 4444226
every time a user submits you could have a counter say $xx
T="0;URL=j avascript: history.go (-2)">
T="0;URL=j avascript: history.go (-$xx)">
then
instead of using
<meta HTTP-EQUIV="Refresh"CONTEN
use
<meta HTTP-EQUIV="Refresh"CONTEN
But THIS WILL WORK only if the pages is dynamically generated using a cgi script !!