Home Articles FAQs XREF Games Software Instant Books BBS About FOLDOC RFCs Feedback Sitemap
irt.Org
#

Q623 How can I make a pull down menu with email addresses?

You are here: irt.org | FAQ | JavaScript | Email | Q623 [ previous next ]

Try:

<SCRIPT LANGUAGE="JavaScript"><!--
function sendmail(object) {
    window.location.href = 'mailto:' + object.options[object.selectedIndex].value;
}
//--></SCRIPT>

<FORM>
<SELECT NAME="selectName">
<OPTION VALUE="xyz@xyz.com">xyz
<OPTION VALUE="abc@abc.com">abc
</SELECT>
<INPUT TYPE="BUTTON" onClick="sendmail(this.form.selectName)" VALUE="Send Mail">
</FORM>

©2018 Martin Webb