www.webdeveloper.com
Results 1 to 3 of 3

Thread: Formmail question

  1. #1
    Join Date
    Sep 2004
    Posts
    85

    Formmail question

    Hi,

    I created a form and it works well. In my html you'll find this:

    <form method="POST" action="http://scripts.ladot.com/cgi-bin/formmail/formmail.pl" style="margin-top: 0; margin-bottom: 0">
    <input type="hidden" name="env_report" value="REMOTE_HOST,HTTP_USER_AGENT,REMOTE_ADDR">
    <input type="hidden" name="recipient" value="xxx">
    <input type="hidden" name="redirect" value="verzonden.htm">
    <input type="hidden" name="subject" value="Contactformulier">

    When the user submits the form, the redirect page should pop up. So after the users presses the send button, there should open a new window showing the page verzonden.htm.

    Does anybody know how to do this?

    Thanks!

    Frank

  2. #2
    Join Date
    Jan 2004
    Location
    Melbourne, Australia
    Posts
    5,298
    This is done via JavaScript.

    Try this:
    Code:
    <script language="JavaScript" type="text/javascript">
    <!--
    //Opens a new window with the specified properties.
    function openWin(pageHref, pageName, pageWidth, pageHeight) 
    {
       var center_t = (screen.height - pageHeight) / 2;
       var center_l = (screen.width - pageWidth) / 2;
    	  
       props = 'height=' + pageHeight + ' ,width=' + pageWidth+' ,top=' + center_t+' ,left=' + center_l+' ,scrollbars=yes ,noresize';	
       show  = window.open(pageHref, pageName, props);
       show.window.focus();
       return true; // Return false if you want the link to be defunct.
    }
    //-->
    </script>
    Call it like this:
    Code:
    onclick="return openWin('url', 'page_name', 740, 543);"
    Regards.

  3. #3
    Join Date
    Sep 2004
    Posts
    85
    Thanks!

Thread Information

Users Browsing this Thread

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

Posting Permissions

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



Recent Articles