Results 1 to 7 of 7

Thread: How to redirect to a new window.

  1. #1
    Join Date
    Jan 2007
    Location
    New York
    Posts
    9

    Default How to redirect to a new window.

    I have a page that has a drop down window for visitors to request that a PDF file be emailed to them. Everything is working fine (http://www.quorumassociates.com/articles_testing2.html) but upon completion of the form the page changes to a good_URL page.

    I really would like for it to redirect to a pop up confirmation that the info was sent which would then just disappear (http://www.quorumassociates.com/requestReceived.html)

    Is there any way to achieve this?

  2. #2
    Join Date
    Dec 2003
    Posts
    3,980

    Default Re: How to redirect to a new window.

    Hi,

    The way browsers work means the page has to be submitted.

    But, you can submit to a popup by adding:
    HTML Code:
    target="_blank"
    to your <form> tag.

    Your good_url page could then have JavaScript to automatically close the window.
    Russell Robinson - Author of Tectite FormMail and FormMailDecoder
    http://www.tectite.com/

  3. #3
    Join Date
    Jan 2007
    Location
    New York
    Posts
    9

    Default Re: How to redirect to a new window.

    I had tried that but couldn't get it to work. I was including it in the good_URL code. I'll try it in the <form> tag.
    Last edited by Jann; 08-May-2009 at 12:03 AM.

  4. #4
    Join Date
    Jan 2007
    Location
    New York
    Posts
    9

    Default Re: How to redirect to a new window.

    I'm getting it into a new tab in the browser window, but not a pop up. Suggestions? Here's what I've got:

    <form method="post" action="http://www.quorumassociates.com/quorumfm.php" target="_blank" name="ContactUs">

  5. #5
    Join Date
    Jan 2007
    Location
    New York
    Posts
    9

    Default Re: How to redirect to a new window.

    I have it! Here's what i did.

    In the <head> tag:
    <SCRIPT TYPE="text/javascript">
    <!--
    function popupform(myform, windowname)
    {
    if (! window.focus)return true;
    window.open('', windowname, 'height=250,width=500,scrollbars=no');
    myform.target=windowname;
    return true;
    }
    //-->
    </SCRIPT>

    In the <body> tag:
    <form method="post" action="http://www.quorumassociates.com/quorumfm.php" onSubmit="popupform(this, 'join')" name="ContactUs">
    <input type="hidden" name="env_report" value="REMOTE_HOST,REMOTE_ADDR,HTTP_USER_AGENT,AUTH_TYPE,REMOTE_USER">

    <input type="hidden" name="good_url" value="http://www.quorumassociates.com/requestReceived.html" />

    Works like a charm!

    Here it is live (well in testing, 'til client approves): http://www.quorumassociates.com/articles_testing2.html

  6. #6
    Join Date
    Dec 2003
    Posts
    3,980

    Default Re: How to redirect to a new window.

    Hi,

    That's great. Good code to have in this section - thanks for posting it.

    I'll make your thread sticky because it will be useful to others.

    The only downside is that it needs JavaScript to work.
    Russell Robinson - Author of Tectite FormMail and FormMailDecoder
    http://www.tectite.com/

  7. #7
    Join Date
    Jan 2007
    Location
    New York
    Posts
    9

    Default Re: How to redirect to a new window.

    Glad to help. I hate when people post their questions w/o giving us a clue how they finally solved it.

    The javascript is a downside, but I do think it's an elegant solution. And thanks for the awesome form script!

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Redirect NOT working
    By LordWulf in forum FormMail Subscription Support
    Replies: 3
    Last Post: 21-Aug-2004, 09:47 PM
  2. Now I am stomped! URL for redirect
    By sigurdur in forum FormMail Subscription Support
    Replies: 3
    Last Post: 01-Aug-2004, 12:02 AM
  3. Link to your own REDIRECT page?
    By cottonslurpy in forum FormMail Subscription Support
    Replies: 2
    Last Post: 17-Jun-2004, 08:36 PM
  4. Thank you page opens in window
    By amazing616 in forum FormMail Subscription Support
    Replies: 1
    Last Post: 04-Jun-2004, 11:12 PM
  5. Redirect to my page on submit
    By insight in forum FormMail Subscription Support
    Replies: 21
    Last Post: 09-Apr-2004, 12:06 AM

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
  •