Loading ...
Sorry, an error occurred while loading the content.
 

Re: OnSubmit Redirect help

Expand Messages
  • coo_t2
    I d probably try redirecting right from inside the cgi script. Try putting this line in the cgi script below the code that processes the form: print Location:
    Message 1 of 2 , Jan 1, 2002
      I'd probably try redirecting right from inside the cgi script.
      Try putting this line in the cgi script below the code that processes
      the form:
      print "Location: http://www.mydomain.com/thankyou.html \n\n";

      You might have problems using the "location" header if you need to
      use "print" before it. I don't think you can use the location header
      after you have sent any other http headers out.
      So if there's a line like:
      print "Content-type: text/html \n\n";
      U need to either take it out or put it in an if statement and only
      print it if you need to print something to the browser.

      hth,
      --Ed

      --- In perl-beginner@y..., "Onyx Web" <onyxweb13@h...> wrote:
      > I need help with sending a form to a thankyou.html page while still
      > submitting the info to an email.
      >
      > Currently I am using form2mail in this way:
      >
      > <form name="darklings" method="post"
      > action="http://www.website.com/cgi/form2mail.cgi"
      > onSubmit=setTimeout('location.href="thankyou.html"',0)>
      >
      > OK, it works once but I noticed that it doesn't work all the time.
      What is
      > the best way to accomplish this?
      >
      > Thanks
      > -Naika
      > http://www.naikaonline.com
      > http://www.triocollective.com
      > http://www.realmgothica.com
      >
      > _________________________________________________________________
      > Get your FREE download of MSN Explorer at
      http://explorer.msn.com/intl.asp.
    Your message has been successfully submitted and would be delivered to recipients shortly.