PDA

View Full Version : Javascript Newbie Needs Help w/Mail Form


liznjersey
03-05-2003, 10:28 PM
My web site has a Contact Us form

http://www.nuxiomega.org/contact.html

Currently, the completed form is e-mailed to a single the webmaster account.

Is there a Javascript that I can add to have the form e-mailed to different e-mail accounts based on which radio button is selected by the user?

For example, if the user selects Membership, the form would be e-mailed to our membership chair's e-mail account. And if the user selects Fundraising, the message would go to the Fundraising chair's account and so on?

Our server doesn't support CGI. I'm a Java newbie who's pretty good with HTML.

Any help on this is greatly appreciated.

Thanks!

Here's the form code if that helps:

<form method=post action="http://webhosting.yahoo.com/forms?login=liznjersey">
<font face="arial, helvetica">
<b>Your name:</b><br>
<input type="text" name="Name" size="27">
<p>


<b>Your E-Mail Address:</b><br>
<input type="text" name="Email" size="27">
<p>

<b>Your URL (if any):</b><br>
<input type="text" name="URL" size="27">
<p>

<b>What is your inquiry about?</b><br>
<input type="radio" name="Inquiry" value="Membership">Membership<br>
<input type="radio" name="Inquiry" value="Ticket">Obtaining Event Tickets<br>
<input type="radio" name="Inquiry" value="Fundraising">Other Fundraising Opportunities<br>
<input type="radio" name="Inquiry" value="Program">Programs<br>
<input type="radio" name="Inquiry" value="Scholarship">Scholarships<br>
<input type="radio" name="Inquiry" value="Tech">Web Site Technical Support<br>
<input type="radio" name="Inquiry" value="Other">Other<br>
<p>
<b>Please enter your question, comment, or inquiry in the space provided and a member of Nu Xi Omega will respond to you shortly.</b>
</font><br>
<textarea cols="75" rows="10" name="Comments"></textarea>


<p><br>
<input type="submit" value="Send">
<input type="reset" value="Clear the form">

<!-- Option 1 -->
<input type="hidden" name="subject" value="Contact Us Form Submission">

<!-- Option 2 -->
<input type="hidden" name="required_fields" value="Name,URL,Email">


<input type="hidden" name="next_url" value="http://www.nuxiomega.org/open.html">


</form>

chrismiceli
03-05-2003, 11:06 PM
yeah, just make it where they click the radio it will change the aciton of the form. like this


<input type="radio" onClick="this.form.action='mailto:someoneelse@where.com'">


try using server side code for your e-mail if you can though.

liznjersey
03-12-2003, 02:53 PM
Perfect! Thanks so much for your help!