readOnly attribute doesn't work for drop down list?

Discussion in 'HTML' started by Matt, Jun 28, 2004.

  1. Matt

    Matt Guest

    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!!
    Matt, Jun 28, 2004
    #1
    1. Advertising

  2. Matt

    Hywel Guest

    In article <>, 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/
    Hywel, Jun 28, 2004
    #2
    1. Advertising

  3. Matt

    DU Guest

    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/interact/forms.html#edef-SELECT

    DU
    DU, Jun 29, 2004
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. SirPoonga
    Replies:
    2
    Views:
    733
    Ben Strackany
    Jan 7, 2005
  2. weiwei
    Replies:
    0
    Views:
    991
    weiwei
    Jan 5, 2007
  3. Jonathan Hyatt
    Replies:
    1
    Views:
    1,844
    Jonathan Hyatt
    Jun 8, 2004
  4. Matt
    Replies:
    3
    Views:
    123
    Grant Wagner
    Jun 28, 2004
  5. Replies:
    5
    Views:
    240
Loading...

Share This Page