SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    Mad Beach Bum jgsketch's Avatar
    Join Date
    Aug 2002
    Location
    FL
    Posts
    825
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Auto close upon submit

    Hello,
    I have a simple popup for a newsletter subscription. Once submitted a new window opens to a thank you page. What I can't figure out is how to close the popup once the form has been submitted. Any ideas on how I can do this? Thanks.

    Code:
    <form action="http://www.expressivecandles.com/action.php" target="_blank" method="post">
    <input type="text" name="email" size="14" value="Your email"> 
    <input type="submit"  value="Subscribe"></form>

  2. #2
    Original Gangster silver trophy Thing's Avatar
    Join Date
    Oct 2000
    Location
    Philadelphia, PA
    Posts
    4,708
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Try something like this:

    Code:
    <script language="javascript">
     <!-- function submit_form() { document.form.submit() self.close() } //--> 
    </script>


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •