Page 1 of 1

<option disabled> doesn't work

Posted: Sun Apr 17, 2005 1:15 pm
by xudzh

Code: Select all

<form name=&quote;charcreate&quote; action=&quote;my-char-creation.htm&quote;>
<select size=&quote;1&quote; name=&quote;charrace&quote;>
  <option>Choose Race</option>
  <option>Human</option>
  <option>Elf</option>
  <option>Dark Elf</option>
  <option>Dwarf</option>
  <option>Ogre</option>
  <option>Troll</option>
  </select>
 <select size=&quote;1&quote; name=&quote;charclass&quote;>
  <option >Choose Class</option>
  <option >Berserker</option>
  <option disabled>Druid</option>
  <option disabled>Necromancer</option>
  <option>Paladin</option>
  <option>Ranger</option>
  <option>Shaman</option>
  <option>Thief</option>
  <option>Wizard</option>
  <option>Warrior</option>
  </select>
"Druid" and "necromancer" isn't disabled when i load the page. If i try to use javascript

Code: Select all

javascript:document.charcreate.charclass.options&#1111;2].disabled=true; void 0;
nothing gets disabled. Instead all the text in the page gets bigger.

Wonder why...

Posted: Sun Apr 17, 2005 1:29 pm
by feyd
because...... option tags don't support disabled last I checked.

Posted: Sun Apr 17, 2005 2:50 pm
by xudzh
but
http://www.w3schools.com/tags/tag_option.asp
said it's defined in 4.0.1
So it's not implemented?

Posted: Sun Apr 17, 2005 3:25 pm
by feyd
very well..

it doesn't look like it can be set however.

Posted: Sun Apr 17, 2005 3:34 pm
by Roja
xudzh wrote:but
http://www.w3schools.com/tags/tag_option.asp
said it's defined in 4.0.1
So it's not implemented?
It depends on the browser. Firefox correctly disables the choices in the dropdown, while IE doesnt.

http://msdn.microsoft.com/workshop/auth ... bled_3.asp
The disabled attribute can be set and retrieved. However, the functionality specified by the HTML 4.0 Non-Microsoft link standard is not implemented for this property.

Posted: Sun Apr 17, 2005 6:37 pm
by xudzh
Microsoft sucks so much... Yet it's so popular and dominate

Well, guess i can only wait for IE7

EDIT:
I had no experiance in real computer programming. Can anyone tell me how hard it is to implement just the standard features?

Posted: Sun Apr 17, 2005 6:57 pm
by xudzh
Also why does the text become so big?
If i use eval() the text also becomes very big...

Posted: Sun Apr 17, 2005 9:22 pm
by Roja
xudzh wrote: EDIT:
I had no experiance in real computer programming. Can anyone tell me how hard it is to implement just the standard features?
Its not simple. While this particular example may or may not be simple, "the standard features" (which I would take to mean css and html compliance) is extremely difficult.

No browser on the market today has 100% css2 compliance, as can be seen at the acid2 test: http://www.webstandards.org/act/acid2/

css2 (http://www.w3.org/TR/REC-CSS2/ ) was formally standardized over 6 years ago.

Posted: Mon Apr 18, 2005 4:27 pm
by xudzh
So microsoft isn't being selfish, they're just not good enough

Posted: Mon Apr 18, 2005 4:42 pm
by Roja
xudzh wrote:So microsoft isn't being selfish, they're just not good enough
While I'm the first to line up to smack Microsoft on the back of the head, it is important to note that *no one* is good enough, at least as of today.

Safari (Apple's browser) seems to be in the fast track to acheive complete compliance with the acid2 test.