Ben@WEBProp
07-17-2003, 06:16 PM
I am nearing the completion of my site, but I need help with just one more thing!
I have a form that needs to be sent to different people depending on the choice made by the user in a drop-down box. How would I do this? I'm not sure what I need as far as exact code...so does anyone have any ideas?:confused:
Lemme know if you need to see a working example!
Thanks!
-Ben
jalarie
07-17-2003, 06:40 PM
<form method="post" target="_blank" action=""
enctype="text/plain" onsubmit="return CheckIt()">
<select name="Sel1">
<option value="jalarie@umich.edu">Me</option>
<option value="jalarie@umflint.edu">Myself</option>
<option value="jalarie@flint.umich.edu">I</option>
</select>
<br />
<textarea cols="40" rows="5" name="Message"></textarea>
<br />
<input type="submit" value=" Submit " title=" Submit " />
<input type="reset" value=" Reset " title=" Reset " />
</form>
<script type="text/javascript">
<!-- Hide this code from non-JavaScript browsers
function CheckIt() {
f1=document.forms[0]; // abbreviation
S1I=f1.Sel1.selectedIndex; // select index
S1T=f1.Sel1.options[S1I].text; // ...on-screen text
S1V=f1.Sel1.options[S1I].value; // ...embedded value
f1.action='mailto:'+S1V;
return true;
}
// End hiding -->
</script>
Ben@WEBProp
07-17-2003, 10:37 PM
:( :( :(
It's still not working...no matter what the crunk I do!
Please take a look at my source code to so what the matter is anyone! Go to http://www.webpropertiesinc.com and follow the nav bar to Forms>Potential Tenants>Commercial and click there. The page that loads is the one that I am talking about!
Please help! I'm so confused!:confused: :eek: :( :eek: :confused:
jalarie
07-18-2003, 01:07 PM
There is no navbar. The only code on the page is:
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<meta http-equiv="Content-Language" content="en-us">
<title>Home Page</title>
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
</head>
<body>
<p align="center"> </p>
<p align="center"> </p>
<p align="center"><b><font face="Verdana" size="5">WEB Properties, Inc.com </font></b></p>
<p align="center"> </p>
<p align="center"> </p>
<p align="center"><img border="0" src="WebPropertiesColor_logo_.gif" width="204" height="71"></p>
<p align="center"> </p>
<p align="center"> </p>
<p align="center"><font face="Verdana" size="5"><b>Will be up soon...</b></font></p>
</body>
</html>
Ben@WEBProp
07-18-2003, 04:16 PM
Oh, then your last post was probably past 5:00 PST...I have to take the site down after 5 every day before I do a final publish. Right now, I just publish daily for testing and help with stuff. It should be up now!
Sorry about that one!
-Ben
jalarie
07-18-2003, 04:28 PM
Yes, I see it now. You've done a nice job.
You'll need to execute the CheckIt function as well as the FrontPage_Form1_Validator function when the form is submitted. The easiest way is to change the last line at the end of the FrontPage_Form1_Validator function to:
return CheckIt();
Ben@WEBProp
07-18-2003, 04:50 PM
Please bear with me, I am still trying to wake up this morning:D
So lemme see if I got this:
I have to run both the FronPage Validator and the CheckIt() at the same time, right? Ok then,
"change the last line at the end of the FrontPage_Form1_Validator function to:
return CheckIt();"
Is the line that you want me to change
onSubmit="return FrontPage_form1_Validator(this)"
into
onSubmit="return FrontPage_Form1_Validator(this) return CheckIt"
?
where exactly am I supposed to put the return CheckIt? Which lines am I supposed to replace?
Oh yes, and thanks for the compliment...I want to eventually do pure css, xhtml, and Flash...but that is a ways away:o ...
-Ben
jalarie
07-18-2003, 05:00 PM
You seem to be using FrontPage <opinion type="personal" content="yuck!" action="ignore"> to work on your site. You will probably have to switch to a text editor like notepad to do this. Find the beginning of your form, back up about six lines to the "return (true);" line, and replace it with "return CheckIt();" without quotes.
Ben@WEBProp
07-18-2003, 05:35 PM
I see exactly where you mean to insert the code! I think I'm getting this! The only problem is the sadist FrontPage Hussein keeps changing the code that I change when it publishes my page! I don't know how to upload it to my server anyother way...do you know a way around it?
Thanks for all your awesome help!
-Ben:thumbsup:
jalarie
07-18-2003, 05:54 PM
Yes, don't use FrontPage.
How about a direct FTP to upload it?
Ben@WEBProp
07-18-2003, 09:30 PM
That is what I do with FrontPage, and it is the only way I know how to do it. How do I do a direct FTP? (Forgive me if I sound ignorant, but I am a newb. Pretty much all of my 150+ posts have been questions, save for about 30 in which i have offered opinions and helped out on a few things...)
Thanks! You are the first person who actually has had a clue about what to do in this situation!
-Ben
jalarie
07-23-2003, 01:01 PM
Please forgive the slowness of this response; I've been off on vacation.
How about reversing the two functions? Code the "form" tag to "return CheckIt();" and change the "CheckIt" function to run the other one.