Link to home
Start Free TrialLog in
Avatar of liina
liina

asked on

Form results to variable email

<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>
Avatar of coreybryant
coreybryant
Flag of United States of America image

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
ASKER CERTIFIED SOLUTION
Avatar of seanpowell
seanpowell
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial