|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
I am unfortunately using Front Page. The company I am working for has non-IT people update their website. If I had my way, they would use straight HTML, JavaScript, etc. Anyway, what I need to do is send an e-mail to a person based on an option picked in a drop down box. For example, if the user selects the option of "Web Site", the form e-mail would get sent to me. If the user selects "Company" someone else in the company would receive the e-mail. Does anyone know if this is possible? I know that I can daisy-chain the forms to each other, each form having a different e-mail address designated to it, but it doesn't allow me to specify based on field criteria. If FrontPage doesn't allow it, is there a cgi out there that allows me to specify based on field information. I know that formmail.cgi allows you to send form e-mails while specifying the to, from, cc, subject fields, but I am unaware if field specifications are available. Any help anyone can give me would be greatly appreciated.
------------------ Those who say it can't be done, shouldn't interrupt those who are doing it. *Chinese Proverb |
|
#2
|
|||
|
|||
|
I guess this shouldn't be too hard to accomplish. The email-address will probably be defined via some form value. Now all you have to do is to:
- have the check-boxes trigger a onChange function (you considered radio-buttons? the email MUST go SOMEWHERE...) - this function sets the selected email-address into that email form-value Let me know if you're not into JavaScript and I'll do those small lines of code for you. PS: I like that proverb! ![]() |
|
#3
|
|||
|
|||
|
Hey, thanks for the mail. Just in case anyone else runs into something similar, I'll post the code here.
It definitely makes sense to use Radiobuttons here, except you want to send the mail to multiple recipients. The code is quite simple and it shouln't be too hard to tweak it to fit into your page. <BLOCKQUOTE><font size="1" face="Verdana,Arial,Helvetica">code:</font><HR><pre> <html> <script language="Javascript"> function setEmail(selectedAdress) { document.aForm.emailAdress.value = selectedAdress ; } </script> <body> <form name="aForm"> <input type="text" name="emailAdress" value="default@email.xyz"> <br><hr><br> <input type="radio" name="aName1" value="" onclick="javascript:setEmail('myAdress@yahoo.com')"> Person1 <br> <input type="radio" name="aName1" value="" onclick="javascript:setEmail('yourAdress@hotmail.com')"> Person2 <br> <input type="radio" name="aName1" value="" onclick="javascript:setEmail('hisAdress@email.com')"> Person3 <br> </form> </body> </html> [/code] Ok? ![]() |
![]() |
| Viewing: Dev Shed Forums > Web Design > HTML Programming > Front Page Forms |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|