[thelist] XHTML/ASP <option disabled="disabled">

Rob Smith rob.smith at THERMON.com
Wed Feb 2 14:26:39 CST 2005


>http://www.w3.org/TR/REC-html40/interact/forms.html#h-17.12.1

I managed to create this:

<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1251">
<style type="text/css">
.disabled{
	color:#ccc;
	
}
</style>
</head>
<body>
<br>
<br>
<select name="dogs"> 
<option value="1">Domestic Dog </option>
<option>Arctic Fox </option>
<option>Maned Wolf </option>
<option>Grey Wolf </option>
<option  class="disabled" onfocus="blur()">Red Fox </option>
<option>Fennec</option>
</select>
</body>
</html>

... but that sparked yet another idea. Drop this altogether for more control
in an example like:

http://www.htmldog.com/articles/suckerfish/example/

Very pretty. I can simulate the non IE implemented disabled feature by not
adding the link and greying out the text.

The only catch is that it's not completely compatible with FF, but there are
work arounds.

Rob


More information about the thelist mailing list