Solved

Form results to variable email

Posted on 2003-11-14
3
294 Views
Last Modified: 2013-12-24
<Is it possible to set the destination of form results based upon the content of a formfield (i.e. drop down box?)>

Hi, question about that I want .
I did the drop-down menu and "Send" / "Reset" buttons, but I can't get the results :(

When I press "Send" I get some kind of error - Cannot run the FrontPage Server Extensions' Smart HTML interpreter on this non-HTML page: "***"

I have something like this (copy-paste with some changes from http://www.timeforweb.com/frontpage/forum_posts.asp?TID=518&PN=5):

<FORM NAME="mailer" METHOD="post" ACTION="" ENCTYPE="text/plain"
onSubmit="(document.mailer.action += mailtoandsubject)">

<!-- Original: Jeff Kieke -->

<!-- This script and many more are available free online at -->
<!-- The JavaScript Source!! http://javascript.internet.com -->

<TABLE BORDER=0>
<TR VALIGN="top">
<TD>Recipient:</TD>
<TD><SELECT NAME="mailtoperson" onChange="msg(this.form)">
<OPTION VALUE="">-- Vali --
<OPTION VALUE="liina.jogisu@mail.ee">Liina mail.ee
<OPTION VALUE="liina_j@yahoo.com">Liina yahoo.com
</SELECT></TD>
</TR>
<TR>
<TD> </TD>
<TD><INPUT TYPE="submit" VALUE="Send" style="font-family: verdana; font-size: 10pt" name="Send">
<INPUT TYPE="reset" VALUE="Reset" name="Reset"></TD>
</TR>
</TABLE>
</FORM>

<SCRIPT LANGUAGE="JavaScript">
function msg() {
document.mailer.action = "mailto:"
mailtoandsubject = ((document.mailer.mailtoperson.options[document.mailer.mailtoperson.selectedIndex].value) + '?subject=' + document.mailer.subject.value);
}

</SCRIPT>
0
Comment
Question by:liina
3 Comments
 
LVL 29

Expert Comment

by:coreybryant
ID: 9747390
What is the extension you are saving the file as?  Honestly, since you got the script from there it might be best to ask Michael how it is supposed to work.  Another thing you might need to ask your hosting company to re-install the FP extensions.

-Corey
0
 
LVL 31

Accepted Solution

by:
seanpowell earned 125 total points
ID: 9747433
Couple of things:

1. Make sure you're using an html page and not asp for this.

2. You need to modify the script and form tag since you no longer have a subject field:

<SCRIPT LANGUAGE="JavaScript">
function msg() {
document.mailer.action = "mailto:"
mailto = ((document.mailer.mailtoperson.options[document.mailer.mailtoperson.selectedIndex].value));
}
</SCRIPT>  

<FORM NAME="mailer" METHOD="post" ACTION="" ENCTYPE="text/plain"
onSubmit="(document.mailer.action += mailto)">

<!-- Original: Jeff Kieke -->

<!-- This script and many more are available free online at -->
<!-- The JavaScript Source!! http://javascript.internet.com -->

<TABLE BORDER=0>
<TR VALIGN="top">
<TD>Recipient:</TD>
<TD><SELECT NAME="mailtoperson" onChange="msg(this.form)">
<OPTION VALUE="">-- Vali --
<OPTION VALUE="liina.jogisu@mail.ee">Liina mail.ee
<OPTION VALUE="liina_j@yahoo.com">Liina yahoo.com
</SELECT></TD>
</TR>
<TR>
<TD> </TD>
<TD><INPUT TYPE="submit" VALUE="Send" style="font-family: verdana; font-size: 10pt" name="Send">
<INPUT TYPE="reset" VALUE="Reset" name="Reset"></TD>
</TR>
</TABLE>
</FORM>
</body>
</html>
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Turn A Profile Picture Into A Cartoon Using Photoshop And Illustrator This tutorial will teach you how to make a cartoon style image out of a regular picture. I have tried to keep the tutorial as simple as possible. I used Adobe CS4 for this tuto…
Objective of This Article In 1990’s, when I was a budding software professional, I had a lot of confusion about which stream or technology, I had to choose to build my career. In those days, I had lot of confusion like whether to choose System so…
The purpose of this video is to demonstrate how to connect a WordPress website to Google Analytics. This will be demonstrated using a Windows 8 PC Go to your WordPress login page. This will look like the following: mywebsite.com/wp-login.php :…
The purpose of this video is to demonstrate how to prevent comment spam on a WordPress Website. This will be demonstrated using a Windows 8 PC. Plugin Akismet will be used. Go to your WordPress login page. This will look like the following: myw…

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now