REQUEST: Help With Transferring to New Page After Submitting Form (Viae-mail)

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Matthew Lybanon

    REQUEST: Help With Transferring to New Page After Submitting Form (Viae-mail)

    If this is not the correct newsgroup, please direct me to one better
    suited to my request.

    I have created a simple online survey (using a form) for a club. For
    several reasons we prefer to have the survey results transmitted via
    e-mail, to be analyzed by a person rather than a CGI script:

    <FORM ID="Club Survey" NAME="Club Survey"
    ACTION="mailto: email@host.com" METHOD="POST" ENCTYPE="text/plain">

    or the equivalent. Rather than simply leaving the form in the browser
    window after the user clicks the submit button:

    <INPUT NAME="Submit Button" TYPE="submit" VALUE="Send Survey" >

    we would like to have the browser automatically transfer to another page
    ("Thank you for participating . . .").

    That is, in effect we want one button do two things:
    1) Submit the results (via e-mail).
    2) Transfer to a new page rather than leaving the form visible in the
    browser window.

    I admit that my knowledge of Javascript is pretty limited--but not
    completely zero. A few times I have been able to adapt scripts that are
    offered openly for general use on various web sites. But in this case I
    can't find any help.

    This seems like a natural thing people would want to do. But as far as
    I have been able to tell, I must be the first person who has ever
    thought of it. There is a choice of (probably) dozens of scripts that
    disable the "submit" button after the first click, but nothing at all
    that does what I describe above.

    I HAVE modified one script into something that works in some browsers
    (code provided upon request), but it would be preferable to find
    something that works in all of them (at least in both Netscape and
    Internet Explorer). I would be grateful for any suggestions or advice,
    either to the newsgroup or directly to my e-mail address

  • Hywel

    #2
    Re: REQUEST: Help With Transferring to New Page After Submitting Form (Via e-mail)

    In article <40BE2ACF.6E59A 2D2@earthlink.n et>, Matthew Lybanon says...[color=blue]
    > If this is not the correct newsgroup, please direct me to one better
    > suited to my request.
    >
    > I have created a simple online survey (using a form) for a club. For
    > several reasons we prefer to have the survey results transmitted via
    > e-mail, to be analyzed by a person rather than a CGI script:
    >
    > <FORM ID="Club Survey" NAME="Club Survey"
    > ACTION="mailto: email@host.com" METHOD="POST" ENCTYPE="text/plain">
    >[/color]
    That's your problem. "mailto" as a form action doesn't work. Use a
    server-side process to send the email. How can JavaScript possibly know
    if the message has been sent successfully?

    --
    Hywel I do not eat quiche


    Comment

    • to heave chunks

      #3
      Re: REQUEST: Help With Transferring to New Page After Submitting Form (Via

      >I have created a simple online survey (using a form) for a club. For[color=blue]
      >several reasons we prefer to have the survey results transmitted via
      >e-mail, to be analyzed by a person rather than a CGI script:
      >
      > <FORM ID="Club Survey" NAME="Club Survey"
      >ACTION="mailto :email@host.com " METHOD="POST" ENCTYPE="text/plain">
      >
      >or the equivalent. Rather than simply leaving the form in the browser
      >window after the user clicks the submit button:
      >
      > <INPUT NAME="Submit Button" TYPE="submit" VALUE="Send Survey" >
      >
      >we would like to have the browser automatically transfer to another page
      >("Thank you for participating . . .").
      >
      >That is, in effect we want one button do two things:
      >1) Submit the results (via e-mail).
      >2) Transfer to a new page rather than leaving the form visible in the
      >browser window.[/color]

      <.form ... onsubmit="windo w.location.href ='url_address'" >

      Check out this link though before you decide a server-side solution isn't the
      way to go.


      [color=blue]
      >I admit that my knowledge of Javascript is pretty limited--but not
      >completely zero. A few times I have been able to adapt scripts that are
      >offered openly for general use on various web sites. But in this case I
      >can't find any help.
      >
      >This seems like a natural thing people would want to do. But as far as
      >I have been able to tell, I must be the first person who has ever
      >thought of it. There is a choice of (probably) dozens of scripts that
      >disable the "submit" button after the first click, but nothing at all
      >that does what I describe above.[/color]

      Javascript has been around for nine years. There are not that many ideas which
      have not been attempted in Javascript, including disabling your computer. :)



      Peace, Vm
      Yaz

      Providing complicated solutions to simple problems since 1997.

      Comment

      Working...