Pass multiple email addresses to a hidden field in a form

Discussion in 'Javascript' started by james00_c@yahoo.com, Jun 21, 2005.

  1. Guest

    Greetings-

    I need to pass multiple email addresses to a "sendto" hidden field in a
    form. I need to do that because "CC" and "BCC" are not an option. One
    address would be hardcoded and another say
    formuser@xyz would be a user input. A sample of my form looks like:

    <table>
    <tr>
    <td width="100%"> <form name="fname" method="POST"
    action="http://cgi_server/cgi-bin/mail.cgi">
    <input type="hidden" name="sendto"
    value="">

    <!-- I would like "value" to end up with
    ",document.fname.email.value" or
    ",". In other words both the
    webmaster and formuser should receive contents of the form. -->

    <input type="hidden" name="subject" value="Request for
    Program Information">
    <input type="hidden" name="location"
    value="thankyou.html">

    <table border="0" width="99%">
    <tr>
    <td width="37%" valign="top"><p>E-mail
    address:</p></td>
    <td width="63%"><input type="text" name="email"
    size="50"></td>
    </tr>
    </table>

    <p align="center">
    <input type="submit" value="Send Request" name="B0">
    <input type="reset" value="Clear Form" name="B1">
    </p>
    </form></td>
    </tr>
    </table>


    Please note that using the form user's Windows email client is not an
    option. Thanks very much for any tips!

    Regards,

    James
    , Jun 21, 2005
    #1
    1. Advertising

  2. RobG Guest

    wrote:
    > Greetings-
    >
    > I need to pass multiple email addresses to a "sendto" hidden field in a
    > form. I need to do that because "CC" and "BCC" are not an option. One
    > address would be hardcoded and another say
    > formuser@xyz would be a user input. A sample of my form looks like:
    >
    > <table>
    > <tr>
    > <td width="100%"> <form name="fname" method="POST"
    > action="http://cgi_server/cgi-bin/mail.cgi">
    > <input type="hidden" name="sendto"
    > value="">


    <form ... onsubmit="
    this.sendto.value += ',' + this.email.value;
    ">

    >
    > <!-- I would like "value" to end up with
    > ",document.fname.email.value" or
    > ",". In other words both the
    > webmaster and formuser should receive contents of the form. -->
    >

    [...]

    > <td width="63%"><input type="text" name="email"
    > size="50"></td>
    > </tr>
    > </table>
    >

    [...]


    --
    Rob
    RobG, Jun 21, 2005
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. TCB

    Multiple Email Addresses

    TCB, Mar 21, 2006, in forum: ASP .Net
    Replies:
    1
    Views:
    441
    sloan
    Mar 21, 2006
  2. namespace1
    Replies:
    3
    Views:
    877
  3. Rick
    Replies:
    3
    Views:
    8,076
    Alexey Smirnov
    Apr 13, 2010
  4. Bharat Suneja
    Replies:
    0
    Views:
    210
    Bharat Suneja
    Sep 10, 2004
  5. GavMc
    Replies:
    4
    Views:
    305
    Evertjan.
    Sep 22, 2005
Loading...

Share This Page