Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Select Controls and Disabled Options... 1

Status
Not open for further replies.

JavaStripped

Programmer
Dec 18, 2002
84
CA
Is there any way to kill the highlighting on disabled [tt]option[/tt] elements in a [tt]select[/tt] control? I figured out how to fade the text to grey; that was rather easy, in fact; but I'd really like to be able to tell the browser not to mouseover-highlight [tt]option[/tt] elements that are disabled. I'm developing for IE6 exclusively (intranet application; for security reasons, the company doesn't allow IE on external connections, not surprisingly), so solutions using "non-standard" features of IE are more than welcome.

JavaStripped
"I did *not* escape. They gave me a day pass."
 

Personally, I'd investigate behaviours for this. I don't know if they will do the job you're after with a standard select box or not, but worth a try. Failing that, using behaviours to write a custom select box is definately "do-able" (we've done it here on our Intranet app, although I'm unable to post the source, unfortunately).

Hope this helps,
Dan
 
Thanks; I'll check that out. Behaviours are something I've been meaning to play with... now I have an excuse. :-D

JavaStripped
"I did *not* escape. They gave me a day pass."
 
Curious... apparently, the "disabled" attribute doesn't actually work in IE6, even though the HTML Black Book cites it as working as of IE5.5. *That's* the real reason why my [tt]<option>[tt] tags keep highlighting when they're supposedly disabled. It's good to know that one's documentation is accurate... I think I'll just build my own popup menu with hyperlinks... it seems to be easier than to rely on standards, which is the biggest problem on the Web today. The reason developers don't adhere to coding standards is because the browsers don't allow them to. At least I've been able to eliminate tables as a positioning device.
[hairpull3]

Rant over. Thanks to BillyRayPreachersSon for his assistance in getting me to investigate behaviours more closely; hopefully I don't overuse them now... ;-)

JavaStripped
&quot;I did *not* escape. They gave me a day pass.&quot;
 
Oops. Missed the closing slash in my [tt] tag above. And I guess my terminology is off; that should be "elements," not "tags," above; I know people (including myself) who are insistently precise regarding terminology; funny enough, most of us are computer professionals of one type or another. Anyway, I'd better get back to building this menu.

JavaStripped
&quot;I did *not* escape. They gave me a day pass.&quot;
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top