The trick I generally use is the onFocus event handler. I think it'll work with select tags:
<select onFocus="this.blur();"> ... </select> On Wed, Oct 29, 2003 at 11:11:04AM -0600, Jerry Jalenak wrote: > Melissa / James - > > Thanks for the replies. It does have something to do with setting the > 'disabled' attribute to 'true'. Unfortunately, per W3C spec, the <select/> > tag doesn't support a 'readonly' attribute, only a 'disabled' attribute. Do > I need to disable the options? or is there a better way to not allow a user > to select a different option? > > > > Jerry Jalenak > Development Manager, Web Publishing > LabOne, Inc. > 10101 Renner Blvd. > Lenexa, KS 66219 > (913) 577-1496 > > [EMAIL PROTECTED] > > > > -----Original Message----- > > From: Melissa L Kelley [mailto:[EMAIL PROTECTED] > > Sent: Wednesday, October 29, 2003 11:08 AM > > To: Struts Users Mailing List > > Subject: Re: [OT - JavaScript] Setting value on a <html:select/> > > > > > > On Wed, 29 Oct 2003, Jerry Jalenak wrote: > > > > > I've got two radio buttons on a form. If the user clicks > > the second radio > > > button, I need to force the value of a following <html:select/> to a > > > specific value, and disable the select. So, using > > JavaScript, on my radio > > > button I fire an onclick event that run a real simple > > javascript function. > > > In this function I've tried using > > > > [...] > > > > When you say "disable the select", are you using the disabled > > attribute > > for the select tag to accomplish this? If so, then the value > > of that form > > element will not be sent with the HTTP request. If you want > > them to not > > change it, set it to readonly instead of disabled. > > > > > > > 'Doh!' moment, but how do I do this? > > > > > > TIA! > > > > > > Jerry Jalenak > > -- Nick Heudecker SystemMobile, Inc. Email: [EMAIL PROTECTED] Web: http://www.systemmobile.com --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]