disabled color

Discussion in 'HTML' started by Jochen Fuhrmann, Oct 8, 2003.

  1. how can i change the color of a disabled fom field?

    jochen
     
    Jochen Fuhrmann, Oct 8, 2003
    #1
    1. Advertising

  2. Jochen Fuhrmann

    brucie Guest

    In post <bm0uji$h2e11$-berlin.de>
    Jochen Fuhrmann said...

    > how can i change the color of a disabled fom field?


    color:blah;background-color:blah;

    color may be system disabled text color. changing default disabled
    colors not recommended. it is not expected behavior.


    --
    brucie.
    08/October/2003 10:19:53 pm
     
    brucie, Oct 8, 2003
    #2
    1. Advertising

  3. "brucie" <> schrieb

    > > how can i change the color of a disabled fom field?

    > color:blah;background-color:blah;


    doesn't work for disabled fields

    > color may be system disabled text color. changing default disabled
    > colors not recommended. it is not expected behavior.


    so is there another way to avoid that the curser gets into to field when i press
    the tab key?
     
    Jochen Fuhrmann, Oct 8, 2003
    #3
  4. "Jochen Fuhrmann" <> wrote:

    > "brucie" <> schrieb
    >
    >> > how can i change the color of a disabled fom field?

    >> color:blah;background-color:blah;

    >
    > doesn't work for disabled fields


    Then you didn't use it properly, or used a browser that does not
    support the relevant parts of relevant specifications. Hard to tell
    without any specifics.

    >> color may be system disabled text color. changing default disabled
    >> colors not recommended. it is not expected behavior.

    >
    > so is there another way to avoid that the curser gets into to field
    > when i press the tab key?


    Pardon? If _that_ was the real question, why didn't you ask it in the
    first place? And how would the color change help?

    Disabled fields by definition do not participate in tabbing order.
    Ref.: http://www.w3.org/TR/html4/interact/forms.html#adef-disabled
    So either the field isn't disabled, or you are using a browser that
    does not support the disabled attribute. Hard to tell without any
    specifics.

    --
    Yucca, http://www.cs.tut.fi/~jkorpela/
    Pages about Web authoring: http://www.cs.tut.fi/~jkorpela/www.html
     
    Jukka K. Korpela, Oct 8, 2003
    #4
  5. Jochen Fuhrmann

    brucie Guest

    In post <bm1utt$h5gbl$-berlin.de>
    Jochen Fuhrmann said...

    >>> how can i change the color of a disabled fom field?


    >> color:blah;background-color:blah;


    > doesn't work for disabled fields


    it works for IE6, moz1.4 and opera7+

    >> color may be system disabled text color. changing default disabled
    >> colors not recommended. it is not expected behavior.


    > so is there another way to avoid that the curser gets into to field when i press
    > the tab key?


    what has the color of the field got to do with tabbing? in any case
    default behavior is for tabbing to skip disabled fields. stop doing
    whatever you're doing so the default behavior works.

    --
    brucie.
    09/October/2003 07:32:35 am
     
    brucie, Oct 8, 2003
    #5
  6. "Jukka K. Korpela" <> wrote

    > >> > how can i change the color of a disabled fom field?
    > >> color:blah;background-color:blah;


    > > doesn't work for disabled fields


    > Then you didn't use it properly, or used a browser that does not
    > support the relevant parts of relevant specifications. Hard to tell
    > without any specifics.


    ie 6.0 <input style="color:rgb(0,0,0)"> -> its still kindof bright grey

    > > so is there another way to avoid that the curser gets into to field
    > > when i press the tab key?


    > Pardon? If _that_ was the real question, why didn't you ask it in the
    > first place? And how would the color change help?


    the problem is, i disabled the <input> stuff, and the color changed, but i
    wanted it to be black, so if theres another was to avoid the cursor in the field
    that
    would help otherwise i would like to have it "disabled black"

    jochen
     
    Jochen Fuhrmann, Oct 8, 2003
    #6
  7. "brucie" <> schrieb

    > what has the color of the field got to do with tabbing? in any case
    > default behavior is for tabbing to skip disabled fields. stop doing
    > whatever you're doing so the default behavior works.


    maybe my description wasn't that exact, the problem is, that if i disable the
    input field, the
    text color changes from black to bright grey, i wanna have it black. disable
    tabbing works ... jochen
     
    Jochen Fuhrmann, Oct 8, 2003
    #7
  8. Jochen Fuhrmann

    brucie Guest

    In post <bm20bc$i8224$-berlin.de>
    Jochen Fuhrmann said...


    > ie 6.0 <input style="color:rgb(0,0,0)"> -> its still kindof bright grey

    ^^^ you missed 'disabled'

    'color' works with mozilla. opera and IE retain their defaults.
    'background-color' works for all three.

    i did say in my first post color may be the system default color.


    --
    brucie.
    09/October/2003 07:47:51 am
     
    brucie, Oct 8, 2003
    #8
  9. Jochen Fuhrmann pounced upon this pigeonhole and pronounced:
    >
    > "brucie" <> schrieb
    >
    > > what has the color of the field got to do with tabbing? in any case
    > > default behavior is for tabbing to skip disabled fields. stop doing
    > > whatever you're doing so the default behavior works.

    >
    > maybe my description wasn't that exact, the problem is, that if i disable the
    > input field, the
    > text color changes from black to bright grey, i wanna have it black. disable
    > tabbing works ... jochen


    If you should manage to change the color to black, imagine the frustration
    of your visitor who tries and tries to type something there.

    Leave it show as disabled, or use something else to display whatever it is
    you want to display.

    --
    -bts
    -This space intentionally left blank.
     
    Beauregard T. Shagnasty, Oct 8, 2003
    #9
  10. "Jochen Fuhrmann" <> wrote:

    > the problem is, i disabled the <input> stuff


    Why?

    > and the color changed,


    A useful indicator, isn't it?

    > but i wanted it to be black,


    Why? To mislead the user?

    > so if theres another was to
    > avoid the cursor in the field


    Is that what you want, or do you wish to disable the field?

    Why don't you just tell what you really wish to accomplish, in terms of
    functionality, and illustrate it with a URL?

    --
    Yucca, http://www.cs.tut.fi/~jkorpela/
    Pages about Web authoring: http://www.cs.tut.fi/~jkorpela/www.html
     
    Jukka K. Korpela, Oct 8, 2003
    #10
  11. "Jukka K. Korpela" <> wrote

    > Is that what you want, or do you wish to disable the field?


    > Why don't you just tell what you really wish to accomplish, in terms of
    > functionality, and illustrate it with a URL?


    i'll try to descibe it. i wanna display a form that consists of 3 fields, one is
    day, than a dot, the next is month followed by a dot and finally the year,
    i want it to look like one field, and i wanna reach the 3 fields by pressing the
    tab key. when i tried to just put the dot between the input fields or put the
    whole thing in a table, the dot wasn't on the same hight as the numbers i
    typed into the input fields, so i thought it would be best to use a disabled
    field,
    which how i described kind of worked, but i still want it to be black.

    jochen
     
    Jochen Fuhrmann, Oct 9, 2003
    #11
  12. "Beauregard T. Shagnasty" <> schrieb

    > If you should manage to change the color to black, imagine the frustration
    > of your visitor who tries and tries to type something there.


    dont think so, cause it doesn't look like a type in form, and because of my
    background color they doesn't see anything, thats the main problem with
    the whole "disabled color"

    > Leave it show as disabled, or use something else to display whatever it is
    > you want to display.


    thats an option, maybe i should try something else

    jochen
     
    Jochen Fuhrmann, Oct 9, 2003
    #12
  13. Jochen Fuhrmann

    rf Guest

    "Jochen Fuhrmann" <> wrote in message
    news:bm26cd$h53fp$-berlin.de...
    >
    > "Jukka K. Korpela" <> wrote
    >
    > > Is that what you want, or do you wish to disable the field?

    >
    > > Why don't you just tell what you really wish to accomplish, in terms of
    > > functionality, and illustrate it with a URL?

    >
    > i'll try to descibe it. i wanna display a form that consists of 3 fields,

    one is
    > day, than a dot, the next is month followed by a dot and finally the year,


    Now that would be very confusing. Over here we use slashes to seperate the
    date. In the USA they put the month first, followed by the day.

    Three fields, clearly labeled "day", "month", "year" would IMHO be better.

    > i want it to look like one field, and i wanna reach the 3 fields by

    pressing the
    > tab key. when i tried to just put the dot between the input fields or put

    the
    > whole thing in a table, the dot wasn't on the same hight as the numbers i
    > typed into the input fields, so i thought it would be best to use a

    disabled
    > field,
    > which how i described kind of worked, but i still want it to be black.


    There is nothing to allow you to change the colour of a disabled field
    specifically. Mozilla does use the suggested colour for the text in the
    field. Opera (my version anyway) ignores all colour. IE6 uses the system
    defined "disabled" colour.

    Since the browsers are not going to play with you on this one there is
    simply nothing you can do.

    If you really want to have it looking like this then don't use an input
    field for the dots. Use a <span> and style it to look the way you want it
    to.

    Cheers
    Richard.
     
    rf, Oct 9, 2003
    #13
  14. Jochen Fuhrmann pounced upon this pigeonhole and pronounced:
    >
    > "Beauregard T. Shagnasty" <> schrieb
    >
    > > If you should manage to change the color to black, imagine the frustration
    > > of your visitor who tries and tries to type something there.

    >
    > dont think so, cause it doesn't look like a type in form, and because of my
    > background color they doesn't see anything, thats the main problem with
    > the whole "disabled color"
    >
    > > Leave it show as disabled, or use something else to display whatever it is
    > > you want to display.

    >
    > thats an option, maybe i should try something else


    Will something like this work?

    <form action="foo"...>
    <fieldset>
    <legend>Enter Date:</legend>
    <label for="day">Day: </label> <input type="text" id="day" size="2">
    <label for="month">Month: </label> <input type="text" id="month" size="2">
    <label for="year">Year: </label> <input type="text" id="year" size="4">
    </fieldset>
    </form>

    Style to taste.
    --
    -bts
    -This space intentionally left blank.
     
    Beauregard T. Shagnasty, Oct 9, 2003
    #14
  15. "rf" <> wrote

    > If you really want to have it looking like this then don't use an input
    > field for the dots. Use a <span> and style it to look the way you want it
    > to.


    yeah, thats maybe the best solution
     
    Jochen Fuhrmann, Oct 9, 2003
    #15
  16. "Beauregard T. Shagnasty" <> schrieb

    > Will something like this work?
    > <form action="foo"...>
    > <fieldset>
    > <legend>Enter Date:</legend>
    > <label for="day">Day: </label> <input type="text" id="day" size="2">
    > <label for="month">Month: </label> <input type="text" id="month" size="2">
    > <label for="year">Year: </label> <input type="text" id="year" size="4">
    > </fieldset>
    > </form>


    sure it'll work, but it doesnt help me with my problem, but i'll try it another
    way,
    and if it doesnt work, ill post an url to check ... thx jochen
     
    Jochen Fuhrmann, Oct 9, 2003
    #16
  17. Jochen Fuhrmann

    brucie Guest

    In post <Mo1hb.142289$>
    rf said...

    > Three fields, clearly labeled "day", "month", "year" would IMHO be better.


    i like (dd/mm/yyyy) with a single input. easy to validate then use
    list($day,$month,$year)=explode('/',$date); to suck out the d/m/y


    --
    brucie.
    09/October/2003 10:40:02 am
     
    brucie, Oct 9, 2003
    #17
  18. "Jochen Fuhrmann" <> wrote:

    >> Will something like this work?
    >> <form action="foo"...> <fieldset>
    >> <legend>Enter Date:</legend>
    >> <label for="day">Day: </label> <input type="text" id="day"
    >> size="2"> <label for="month">Month: </label> <input type="text"
    >> id="month" size="2"> <label for="year">Year: </label> <input
    >> type="text" id="year" size="4"> </fieldset> </form>

    >
    > sure it'll work, but it doesnt help me with my problem,


    Then we still don't know what your ultimate problem is. It surely
    wasn't disabled color.

    The proposed solution, or something rather similar to it, is surely the
    best approach to the problem of date input. If you add markup that
    makes each pair of label and input field appear on a line of its own
    (using <div> container or <br> separator), it becomes comfortable to
    the user, accessible (even a blind person, literally, finds it
    suitable), and safe against common errors. (Beware of approaches that
    take a date as a single string unless you can be sure that you agree
    with the worldwide audience of what, say, 04/07/03 means - there are at
    least six different interpretations.)

    So if it does not help with your problem, what _is_ the problem?

    But please do not bother answering before you can have those Shift and
    "." keys fixed.

    --
    Yucca, http://www.cs.tut.fi/~jkorpela/
    Pages about Web authoring: http://www.cs.tut.fi/~jkorpela/www.html
     
    Jukka K. Korpela, Oct 9, 2003
    #18
  19. Jochen Fuhrmann

    rlynch99

    Joined:
    Feb 1, 2010
    Messages:
    1
    Input box properties

    I was bashing my head on this one last week and found that if you don't want people to change the contents of an input box, you don't need to disable it.

    Just declare it as Readonly..

    E.G.
    <input name="inputSomething" type="text" value="this is a test" readonly="readonly" id="inputSomething" />

    8)

    Hope that helps

    Rob
     
    rlynch99, Feb 1, 2010
    #19
    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. Leo Duran
    Replies:
    0
    Views:
    907
    Leo Duran
    Aug 6, 2003
  2. tshad

    LinkButton disabled color

    tshad, Aug 3, 2005, in forum: ASP .Net
    Replies:
    2
    Views:
    3,679
    tshad
    Aug 4, 2005
  3. Jochen Fuhrmann

    <input disabled> color

    Jochen Fuhrmann, Jan 13, 2004, in forum: HTML
    Replies:
    8
    Views:
    33,280
    jayvardhanpatil
    Apr 19, 2009
  4. Romeyer Olivier
    Replies:
    12
    Views:
    11,084
  5. Kamaljeet Saini
    Replies:
    0
    Views:
    447
    Kamaljeet Saini
    Feb 13, 2009
Loading...

Share This Page