Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > readOnly attribute doesn't work for drop down list?

Reply
Thread Tools

readOnly attribute doesn't work for drop down list?

 
 
Matt
Guest
Posts: n/a
 
      06-28-2004
I want to know if readOnly attribute doesn't work for drop down list?
If I try disabled attribute, it works fine for drop down list. When I
try text box, it works fine for both disabled and readOnly attribute.

For example, #1 will work, but #2 doesn't work

1) <SELECT name="streetDirection" class="FormInput" DISABLED>
In JavaScript, I have InputForm.streetDirection.disabled = false;

2) <SELECT name="streetDirection" class="FormInput" readOnly>
In JavaScript, I have InputForm.streetDirection.readOnly= false;

any ideas? thanks!!
 
Reply With Quote
 
 
 
 
Hywel
Guest
Posts: n/a
 
      06-28-2004
In article <(E-Mail Removed) >, Matt
says...
> I want to know if readOnly attribute doesn't work for drop down list?
> If I try disabled attribute, it works fine for drop down list. When I
> try text box, it works fine for both disabled and readOnly attribute.
>
> For example, #1 will work, but #2 doesn't work
>
> 1) <SELECT name="streetDirection" class="FormInput" DISABLED>
> In JavaScript, I have InputForm.streetDirection.disabled = false;
>
> 2) <SELECT name="streetDirection" class="FormInput" readOnly>
> In JavaScript, I have InputForm.streetDirection.readOnly= false;


Considering that you can't change the content of a drop-down list
(without using scripting) is there any point in making it read only?
After all, it already is.

--
Hywel

Big Brother Petition - Better TV Wanted!
http://www.petitiononline.com/BBFlood/
 
Reply With Quote
 
 
 
 
DU
Guest
Posts: n/a
 
      06-29-2004
Matt wrote:

> I want to know if readOnly attribute doesn't work for drop down list?
> If I try disabled attribute, it works fine for drop down list. When I
> try text box, it works fine for both disabled and readOnly attribute.
>
> For example, #1 will work, but #2 doesn't work
>
> 1) <SELECT name="streetDirection" class="FormInput" DISABLED>
> In JavaScript, I have InputForm.streetDirection.disabled = false;
>
> 2) <SELECT name="streetDirection" class="FormInput" readOnly>
> In JavaScript, I have InputForm.streetDirection.readOnly= false;
>
> any ideas? thanks!!


I don't see any readonly attribute in the list of valid attributes for
select:
http://www.w3.org/TR/html401/interac...ml#edef-SELECT

DU
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Affecting a dynamically created drop down from another dynamically created drop down. msimmons ASP .Net 0 07-16-2009 03:17 PM
retrive preselected value in second drop down list from the first drop down list weiwei ASP .Net 0 01-05-2007 07:29 PM
New to .NET, can I have one drop down box control the data of another drop down box using a database? SirPoonga ASP .Net 2 01-07-2005 10:44 PM
readOnly attribute doesn't work for drop down list? Matt Javascript 3 06-28-2004 05:29 PM
ASP.NET Readonly panel function with readonly checkbox, readonly radiobutton Jonathan Hyatt ASP .Net Web Controls 1 06-08-2004 07:42 PM



Advertisments