0
Send 2 e-mail based on drop-down selection
Hi guys! I have a question regarding sending e-mail when selecting an option in the drop-down list. I have 10 cities as an option in the drop-down list and when I choose a city (eg London) I want the submit button to send e-mail to the London office. Also send the same email to the head office. So 2 e-mails every time you choose a city (selected city and head office). I also want to mention that it needs to be made with javascript, html and css only. I was wondering if I can do it with switch statment in javascript. What do you think? Do you have any other suggestions? All suggestions and tips are appreciated. Thank you.
6 odpowiedzi
+ 1
Sabit_iz_Tarcina short answer is yes you can do it with switch case in javascript and node.js
+ 1
@BroFar
I also wonder is it possible with switch to send 2 emails or just one? do you have another tip that can do with javascript maybe?
+ 1
you can designate 2 locations to switch case to. Alternative would be php, both can process as just in time.
+ 1
Okay thank you for tip, I'll try it :)
0
how about assign an email to each item in drop down, data- attribute might be handy.
then add listener that open multiple mailto: link using that data- attributes
0
@Rei
Hmm, I'm not so good on Javascript. Can you show me with eg how you think?