473,404 Members | 2,137 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,404 software developers and data experts.

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 ?
Jul 20 '05 #1
4 3173
Craig hu kiteb:
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 ?


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

Jul 20 '05 #2
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.setfocus.

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

Anyway to get around this small thing ?

Craig

"Fabian" <la****@hotmail.com> wrote in message
news:bq*************@ID-174912.news.uni-berlin.de...
Craig hu kiteb:
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 ?


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

Jul 20 '05 #3
"Craig" <my****@myaccount.com> wrote in message
news:3f***********************@lovejoy.zen.co.uk.. .
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 ?


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
jf****@msn.com
http://www15.brinkster.com/vbnotebook
Jul 20 '05 #4
Frank Carr wrote:
"Craig" <my****@myaccount.com> wrote in message
news:3f***********************@lovejoy.zen.co.uk.. .
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 ?


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.


Why not something like:

<form>
<input type="text" name="one" size="5"
onblur="this.form.result.value = +this.value + +this.form.two.value;" />
<input type="text" name="two" size="5"
onblur="this.form.result.value = +this.value + +this.form.one.value;" />
=
<input type="text" name="result" size="5" readonly onfocus="this.blur();"
style="border:none;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 <gw*****@agricoreunited.com>

* Client-side Javascript and Netscape 4 DOM Reference available at:
*
http://devedge.netscape.com/library/...ce/frames.html

* Internet Explorer DOM Reference available at:
*
http://msdn.microsoft.com/workshop/a...ence_entry.asp

* 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
Jul 20 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Bryan Van. | last post by:
Hello, I've had Visual Studio .NET for C# only two weeks now. Today I encounter a big problem with the developer. The edit menu is disabled! Both using the right click of the mouse, the edit menu...
0
by: Andy Bates | last post by:
Hi - I have a ToolBar with 32-bit colour icons. It looks really good, but I need to disable some of the buttons. When I do this, I get a grey blob where the image has been converted into a...
2
by: Carl Gilbert | last post by:
Hi I am looking to edit an icon at runtime on menu items such as change fill colour. I wish to replicate the features found in most applications where by the coloured bar on a colour picker...
4
by: Mel | last post by:
how can i change disabled background on all form elements ?
4
by: Bob | last post by:
Hi, Is it possible to change the forecolor of a disabled text control. I have a RichText Box that I don't want the user to edit but the Grey on Grey default is hard to read. Is there a way of...
7
by: garyusenet | last post by:
I'm using krypton toolkit which has allowed me to make a cool looking form. However, when I set my textbox to disabled it is 'greyed' out. The grey colour isn't in keeping with the office 2007...
3
by: mycall | last post by:
I had a quick look but couldnt find much on this. What i have is a contiunous form with each row having an 'edit' button. By default all feilds have been set to disabled to stop the user...
2
by: =?Utf-8?B?bG91aXNlIHJhaXNiZWNr?= | last post by:
HI there. I use IE7. We have a user with bad eyesight. he cannot read the font when IE makes an input disabled (the light grey color font). I am able to change the background to a different color...
16
by: shapper | last post by:
Hello, I would like to change the look of disabled inputs of type text on my web site. Should I add a disabled css class to all these inputs or is it possible to select them in my CSS Code...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.