PDA

View Full Version : HTML Pulldown menu help



18-02-2002, 05:17 PM
This is kind of hard to explain so I'll do my best.

Here's the code:
<select name='senderaddr'>
<option value='gen@domain.com'>General</option>
</select>

What I want to do is make the text selected e.g. General to be named 'sendername'

I have created an email form and I keep having to fill in the name and select the email address it's for.

I just want to be able to select the email address and the name will be assigned to that as well.

I know how to do it in javascript but is it possible just to do both in the pulldown menu.

Thanks for the help.

18-02-2002, 07:57 PM
Kame,

Try adding the word 'selected' to your option, like this (cut and pasted out of my file):

<SELECT size=1 name=sendto tabindex=0>
<OPTION value='kame@krazee.co.nz' selected>Kame</OPTION>
<OPTION value='krazee@kame.co.nz'>Krazee</OPTION>
</SELECT>

HTH

Mike.

PS If it doesn't work, feel free to email me at mike.l@ywamalumni.com and I'll send you the email form I've got, and the PHP script that goes with it.

18-02-2002, 08:16 PM
I have the pulldown menu working what I am trying to do is that the option selected like Krazee will become 'sendername'

I've tried
<option value='krazee@kame.co.nz'><a name='sendername'>Krazee</a>
hoping that would make sendername=Krazee but it didn't work.

Instead of this I have an input box that I have to fill out the name separately and select the correct email address for that name.