?
Solved

How to stop my html pages hanging after a cgi script

Posted on 2003-02-28
6
Medium Priority
?
218 Views
Last Modified: 2013-12-25
After filling in a form on my siteaubmitting it and havoing the from details displayed to theuser, there is no further action bythe server.

How do I get it to go back to the referring url ?
WHat statement do I add to the form ?
0
Comment
Question by:astoller
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
  • 2
6 Comments
 
LVL 2

Expert Comment

by:BassTeQ
ID: 8053916
Javascript is your best bet, simply print the string

print qq!<a href="javascript:history.go(-1)">GO BACK</a>!;

When the user clicks on the link it will take them to the referring page.
0
 

Author Comment

by:astoller
ID: 8056179
Could we have it take them back to the referring page without them having to click on the link?
0
 

Author Comment

by:astoller
ID: 8056202
The javascript statement.
Does it go into the perl script ?
What happens is
Form is filled in and submitted.
Then we get a page showing details entered, generated by the perl script.
So do I put the new line into the perl script ?
0
Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

 
LVL 2

Expert Comment

by:BassTeQ
ID: 8060586
Yes put the following code into the perl script, it will automatically take the user back to the previous page, they will not need to click a link.

print "<script>history.go(-1);</script>";

I think it would be better to tell the user that the form has submitted successfully and they can click a link to go back to the previous page ?

Hope this helps!
0
 

Accepted Solution

by:
archaic0 earned 200 total points
ID: 8105386
If your host is using the standard formmail script, then you can add this to your form:

<input type="hidden" name="redirect" value="url">

and it will send the user to "url" after submitting the form.
0
 

Expert Comment

by:archaic0
ID: 8105391
Of course, at that url you put a page that thanks them for their input and provides them links to go on from there.
0

Featured Post

Monthly Recap

May was a big month for new releases from Linux Academy! Take a look at what our team built recently in our blog. You can access the newest releases from our blog.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article is meant to give a basic understanding of how to use R Sweave as a way to merge LaTeX and R code seamlessly into one presentable document.
Originally, this post was published on Monitis Blog, you can check it here . In business circles, we sometimes hear that today is the “age of the customer.” And so it is. Thanks to the enormous advances over the past few years in consumer techno…
Learn the basics of modules and packages in Python. Every Python file is a module, ending in the suffix: .py: Modules are a collection of functions and variables.: Packages are a collection of modules.: Module functions and variables are accessed us…
Learn the basics of while and for loops in Python.  while loops are used for testing while, or until, a condition is met: The structure of a while loop is as follows:     while <condition>:         do something         repeate: The break statement m…
Suggested Courses

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question