Disabled Edit Box Colour

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Craig

    Disabled Edit Box Colour

    I have a page that has a few columns and totals.

    I've been asked to amke sure that not only is the totals boxes readonly,
    they must not accept focus from the cursor.

    However, setting the bo to Disabled makes the font go inverted it seems. I'd
    like to be able to still control the colour of these boxes, both the
    background and foreground, but not makethem the light grey that they are
    going at the moment.

    Is there a way to make sure the user can't tab to a totals edit box ?


  • Fabian

    #2
    Re: Disabled Edit Box Colour

    Craig hu kiteb:
    [color=blue]
    > I have a page that has a few columns and totals.
    >
    > I've been asked to amke sure that not only is the totals boxes
    > readonly, they must not accept focus from the cursor.
    >
    > However, setting the bo to Disabled makes the font go inverted it
    > seems. I'd like to be able to still control the colour of these
    > boxes, both the background and foreground, but not makethem the light
    > grey that they are going at the moment.
    >
    > Is there a way to make sure the user can't tab to a totals edit box ?[/color]

    Set an onfocus event on that box to transfer the focus. Then you don't
    need to explicitly disable it.


    --
    --
    Fabian
    Visit my website often and for long periods!


    Comment

    • Craig

      #3
      Re: Disabled Edit Box Colour

      Thanks for that!

      I'm just knocked with another problem here...
      Now when the focus gets moved to the next available enabled edit box, the
      text isn't selected when you use editbox.setfocu s.

      However, when you tab normally to edit boxes, the text is selected.

      Anyway to get around this small thing ?

      Craig

      "Fabian" <lajzar@hotmail .com> wrote in message
      news:bqpmpg$101 mg6$1@ID-174912.news.uni-berlin.de...[color=blue]
      > Craig hu kiteb:
      >[color=green]
      > > I have a page that has a few columns and totals.
      > >
      > > I've been asked to amke sure that not only is the totals boxes
      > > readonly, they must not accept focus from the cursor.
      > >
      > > However, setting the bo to Disabled makes the font go inverted it
      > > seems. I'd like to be able to still control the colour of these
      > > boxes, both the background and foreground, but not makethem the light
      > > grey that they are going at the moment.
      > >
      > > Is there a way to make sure the user can't tab to a totals edit box ?[/color]
      >
      > Set an onfocus event on that box to transfer the focus. Then you don't
      > need to explicitly disable it.
      >
      >
      > --
      > --
      > Fabian
      > Visit my website often and for long periods!
      > http://www.lajzar.co.uk
      >[/color]


      Comment

      • Frank Carr

        #4
        Re: Disabled Edit Box Colour

        "Craig" <myspam@myaccou nt.com> wrote in message
        news:3fd05cfd$0 $14051$fa0fcedb @lovejoy.zen.co .uk...
        [color=blue]
        > I have a page that has a few columns and totals.
        >
        > I've been asked to amke sure that not only is the totals boxes readonly,
        > they must not accept focus from the cursor.
        >
        >..........
        >
        > Is there a way to make sure the user can't tab to a totals edit box ?[/color]

        My recommendation would be not to use an edit box to display the totals. If
        it is a edit box it gives a 'visual affordance' of being clickable,
        tab-able, and editable. Use a different method to display the total so that
        the user can easily tell that it isn't for interaction.


        --
        Frank Carr
        jfcarr@msn.com



        Comment

        • Grant Wagner

          #5
          Re: Disabled Edit Box Colour

          Frank Carr wrote:
          [color=blue]
          > "Craig" <myspam@myaccou nt.com> wrote in message
          > news:3fd05cfd$0 $14051$fa0fcedb @lovejoy.zen.co .uk...
          >[color=green]
          > > I have a page that has a few columns and totals.
          > >
          > > I've been asked to amke sure that not only is the totals boxes readonly,
          > > they must not accept focus from the cursor.
          > >
          > >..........
          > >
          > > Is there a way to make sure the user can't tab to a totals edit box ?[/color]
          >
          > My recommendation would be not to use an edit box to display the totals. If
          > it is a edit box it gives a 'visual affordance' of being clickable,
          > tab-able, and editable. Use a different method to display the total so that
          > the user can easily tell that it isn't for interaction.[/color]

          Why not something like:

          <form>
          <input type="text" name="one" size="5"
          onblur="this.fo rm.result.value = +this.value + +this.form.two. value;" />
          <input type="text" name="two" size="5"
          onblur="this.fo rm.result.value = +this.value + +this.form.one. value;" />
          =
          <input type="text" name="result" size="5" readonly onfocus="this.b lur();"
          style="border:n one;border-bottom:1px solid Black;text-align:right;" />
          </form>

          Works in every browser from Netscape 4 (and possibly 3) to the most modern
          browsers available. Certainly it creates some false input cues on some
          browsers, but it provides the same functionality on almost every browser
          without any modification what-so-ever.

          --
          | Grant Wagner <gwagner@agrico reunited.com>

          * Client-side Javascript and Netscape 4 DOM Reference available at:
          *


          * Internet Explorer DOM Reference available at:
          *
          Gain technical skills through documentation and training, earn certifications and connect with the community


          * Netscape 6/7 DOM Reference available at:
          * http://www.mozilla.org/docs/dom/domref/
          * Tips for upgrading JavaScript for Netscape 7 / Mozilla
          * http://www.mozilla.org/docs/web-deve...upgrade_2.html


          Comment

          Working...