Have you tried the onchange method?
Dave
"Melissa Rabin" <[EMAIL PROTECTED]> on 07/18/2001
11:03:53 AM
Please respond to [EMAIL PROTECTED]; Please
respond to [EMAIL PROTECTED]
To: "Struts-User" <[EMAIL PROTECTED]>
cc: (bcc: David Hay/Lex/Lexmark)
Subject: Trapping an <html:option> value
Hello. I am fiddling with an application that uses Struts <html:select> &
<html:option> tags, and I need to generate some DHTML depending on which
option is selected. However, only the <html:select> tag accepts javascript
events; therefore, any onClick event will be triggered when the user pulls
down the menu, not when they actually make a selection. Can anyone give me
some suggestions on how to trap the value selected?
Code:
<html:select name="JNDIForm" property="action">
<html:option value="lookup">Lookup an Entry in the JNDI
Tree</html:option>
<html:option value="bind">Make an Entry in the JNDI Tree</html:option>
<html:option value="rebind">Change An Entry In The JNDI
Tree</html:option>
<html:option value="unbind">Remove An Entry In The JNDI
Tree</html:option>
</html:select>
Melissa Rabin
Web Developer