473,662 Members | 2,760 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

style and disabled?

Is disabled to be set in the style of a tag just like visible? I am trying
to set the whole content of a td tag to disabled like this,
style='disabled :true' and it does not seem to work. Is this possible of is
disabled not to be set in style?
Nov 4 '05 #1
1 25824
Martin wrote:
Is disabled to be set in the style of a tag just like visible? I am trying
to set the whole content of a td tag to disabled like this,
style='disabled :true' and it does not seem to work. Is this possible of is
disabled not to be set in style?


It's actually an HTML question, but since you're here...

In the HTML 4 specification, 'disabled' is an attribute of button,
input, optgroup, option, select, and textarea elements. It can have two
values: true or false.

<URL:http://www.w3.org/TR/html4/interact/forms.html#adef-disabled>
It's value can be set in the HTML source (if set, the value is 'true'
and the element is disabled):

<input type="text" .... disabled>

Or by script:

<form ...>
<input type="text" name="textA">
<input type="button" value="Disable textA" onclick="
this.form.textA .disabled = true;
">
...
</form>
If set to 'true', the element is disabled. If set to false, it is
enabled (i.e. is is not disabled).

--
Rob
Nov 4 '05 #2

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

Similar topics

1
6680
by: Kruse | last post by:
Hi, Is Possible to alter the "disabled" style? I have got <input name="test" value="1" disabled> This makes the input field gray and shadow.
1
32264
by: Chris Ullman | last post by:
Simply put - if I have a disabled textbox how could I change the font-color from gray? e.g. <input type="text" disabled></input> Color no longer seems to work. Can it be done and if so how? Thanks, Chris Ullman
15
122124
by: Gérard Talbot | last post by:
Hello all, I'd like to know and understand the difference between, say, <img src="/ImageFilename.png" width="123" height="456" alt=""> and <img src="/ImageFilename.png" style="width: 123px; height: 456px;" alt="">
6
7735
by: Stu Carter | last post by:
Hi, I have an aspx page where some controls are initially disabled by the code-behind 'Page_Load' event. I want these controls to be dynamically enabled when the user checks a checkbox. Because I don't want a post-back, I added some javascript to do this However, using client-side JS, I cannot enable any controls that have been disabled by server-side code. If the control is initially enabled, I can disable/enable it client-side.
2
7126
by: Kubuli John | last post by:
I have a LinkButton in an ASP.NET web form. Depending on the current state of affairs, I either enable or disable the link button in by code-behind class (e.g., disable the "Previous" button if you are already at the first record). I have constructed a very nice style for the button in my stylesheet, but the style is ignored when I disable the button. So, how do I control the display attributes of a disabled HTML widget? Thanks...
0
1260
by: somefakeaddress | last post by:
If I create two buttons, like this: <input type="button" value="An enabled button" style="font-size:40px; color:#a0a094; background:#d2d2c6;" /> <br /><br /> <input type="button" value="A disabled button" disabled style="font-size:40px; color:#a0a094; background:#d2d2c6;" /> .... the text in the disabled button will get a different font color than the one in the enabled button if I view the HTML page in Internet
6
1896
by: James Black | last post by:
'When my form is submitted, I have onsubmit pointed to the following code snippet. But, the button is not actually set to disabled and the style.visibility changes are not made for several seconds. It appears that it goes into validateForm and doing the rest of this snippet before the browser makes the changes. How can I get the browser to immediately make the UI change? Thanx.
6
13765
by: rongchaua | last post by:
Hi all, I want to change the style of a button. But I don't know how to do it. For example, I have already a button OK on form. I want to add these styles to this button (WS_CHILD || WS_VISIBLE || WS_CLIPSIBLINGS || WS_TABSTOP || BS_FLAT). What should I do now? All help will be appreciated. rca.
1
1410
by: JohnIdol | last post by:
Hi All, I am using this funcion to manipulate form elements; every thing works fine except the reference to the disabled property. Any help (the property works fine when used in classic manner)? Thanks! G
0
8345
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8857
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8768
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8633
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7368
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6186
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4348
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2763
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1999
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.