SPAM-LOW: Re: [Javascript] dropdown and readonly

Peter Brunone peter at brunone.com
Thu Oct 28 12:01:50 CDT 2004


	Also -- and this may not apply to you -- if you're developing in
ASP.NET, EasyListBox can be set to disabled and still submit its value.

-----Original Message-----
From: javascript-bounces at LaTech.edu On Behalf Of jsWalter

> Hi!
>
> Interesting prbolem. How to change dropdown to readOnly propertie?

can't. By definition, SELECT is READONLY, since a user can't modify its
contents.


> If I change it to disabled then the form (dropdown) is not submited.

Right. By definition, DISABLED is not sent via FORM SUBMIT.

When I need to make a SELECT 'readonly' (as you say), I do it via JS and
then insert the value I want into a hidden INPUT with the same name.

When the SELECT is not 'readonly', then the HIDDEN is DISABLED so its
value (or lack there of) is not sent to the server.

Does that help?

Walter





More information about the Javascript mailing list