473,387 Members | 3,750 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,387 software developers and data experts.

Unable to disable div contents in Firefox 2

1
I have the following piece of code:

Expand|Select|Wrap|Line Numbers
  1. <html >
  2.     <body>
  3.         <div disabled="disabled">
  4.             <input type="checkbox" />Try this
  5.         </div>
  6.     </body>
  7. </html>
In IE, the check box is disabled, but not in firefox. It works if disabled attribute is set on checkbox element itself. But in my project, I have number of such checkboxes, so I wanted to know if there was a way to disable the div so that its children too will be disabled? Why isn't the disabled attribute value inherited by the children of div element in firefox?
Apr 3 '08 #1
1 6503
drhowarddrfine
7,435 Expert 4TB
In IE, the check box is disabled, but not in firefox.
Never, ever use IE as a reference for how things should work.
I wanted to know if there was a way to disable the div so that its children too will be disabled? Why isn't the disabled attribute value inherited by the children of div element in firefox?
Attributes in HTML are not inherited. There is no such thing as a 'disabled' attribute on <div>. So you are asking Firefox to do something against the standard. Never, ever trust IE.
Apr 3 '08 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: David Rwj Cherry CS2000 | last post by:
is there any way to disable or lock vertical scroll bars on a browser window? im a newbie and i just don't want them to appear on my screen. sometimes they appear on IE but not on mozilla. any...
29
by: lori3laz | last post by:
How do you disable the right click>view source option on web pages so people can't view your coding and copy it? What's the html I need to include in my website to utilize this feature? Thank...
1
by: Bob | last post by:
Does anyone know how to disable javascript in the new Netscape 8 -- for off line testing (like can be done readily with the current MSIE, Firefox or Opera browsers) ? When I try tools -> options...
5
by: yawnmoth | last post by:
I wrote the following in an attempt ot better understand importNode: <script> f1=document.createElement("iframe"); f1.src=unescape("http://www.domain.tld/test.txt");...
11
by: Joey | last post by:
Hello, In my C# asp.net 2.0 application, I have a webform with a button server control on it. The webform, like most others in the site, subscribes to a master page. I have determined that the...
14
by: Amar | last post by:
Hi All, I am a newbie to PHP and have the task to create a page using PHP where in that page I need to disable all key operation as well as mouse operation even also the menu operation that...
1
by: David Henderson | last post by:
I know 'disable-output-escaping' has been discussed in the past, but I can't put my finger on any of the threads to see if my current problem is addressed. Sorry for re-asking the question if it...
2
by: yong321 | last post by:
My question is not about Javascript programming. I'd like to use a browser, either IE or Firefox or whatever, that allows me to disable a specific Javascript function but not disable Javascript...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
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,...

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.