?
Solved

How do I close a formmail window after submission?

Posted on 2007-04-11
1
Medium Priority
?
232 Views
Last Modified: 2013-12-25
On my formmail.cgi script, I can assign a redirect page like this:

<input type=hidden name="redirect" value="http://www.mydomain.com/page.htm">

Because my form is a pop up window to the user, what can I put in the redirect parameter to close the window when it submits?
0
Comment
Question by:bemara57
[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
1 Comment
 
LVL 11

Accepted Solution

by:
Isisagate earned 2000 total points
ID: 18892380
You can't really put anything in the redirect param, but on the page you end up on you can add in

<script type="text/javascript"> window.close(); </script>

and that will close the window. However it will probably prompt the user if they want to or not becuase of security features put in place to keep a site from closing the window on load.
0

Featured Post

Setting up LaraDock for Laravel

Learn how to set up LaraDock in a Laravel project - LaraDock gives us an easy way to run a Laravel application using Docker in a single command.

Question has a verified solution.

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

JavaScript can be used in a browser to change parts of a webpage dynamically. It begins with the following pattern: If condition W is true, do thing X to target Y after event Z. Below are some tips and tricks to help you get started with JavaScript …
This article discusses how to implement server side field validation and display customized error messages to the client.
Learn the basics of if, else, and elif statements in Python 2.7. Use "if" statements to test a specified condition.: The structure of an if statement is as follows: (CODE) Use "else" statements to allow the execution of an alternative, if the …
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
Suggested Courses

762 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