[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
SELECT values
O.K. guys, this is probably a stupid question but I just can't get the following
script to work. I've checked the 411 FAQ, and the %$@ official documentation.
All I want to do is return the value selected in the OPTION list in the alert window.
By the way, I spent a good amount of time on 411. It is a very nice FAQ, good work
Andy. I have a couple suggestions but I'll post them seperately.
Obviously, I have stripped out the extraneous stuff:
<SCRIPT LANGUAGE="JAVASCRIPT">
function newtopic() {
alert("Selected SubTopicID="+document.SubTopicID.value)<<I've tried
every syntax I can think of with .value,
.selectedIndex....
}
</SCRIPT>
<FORM NAME="listform">
<SELECT NAME="SubTopicID">
<OPTION>Disk Drives
<OPTION>Motherboards
<OPTION>SCSI Controllers
<OPTION>Memory
</SELECT>
<INPUT TYPE="button" VALUE="Reload" onClick="newtopic()">
</FORM>
Any help will be greatly appreciated.
Chris Moses
--------------------------------------------------------------------
For help about the list, please send a message to 'majordomo@obscure.org'
with the message body 'help'. To unsubscribe, send a message to
'majordomo@obscure.org' with the message body 'unsubscribe javascript'.
List archives and pointer to FAQ: http://www.obscure.org/javascript/