Wrox Programmer Forums
|
HTML Code Clinic Do you have some HTML code you'd like to share and get suggestions from others for tweaking or improving it? This discussion is the place.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the HTML Code Clinic section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old March 9th, 2006, 06:21 AM
Friend of Wrox
 
Join Date: Nov 2005
Posts: 223
Thanks: 0
Thanked 0 Times in 0 Posts
Default disable Select option

Hi,

How do i disable a option in a pulldown

This works in firefox
Code:
<select>
  <option></option>
  <option disabled></option>
  <option></option>
</select>
Can i make the same effect work in IE

__________________________________________________ ________
This is my junk I'm gona eat it
 
Old March 9th, 2006, 07:46 AM
joefawcett's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 3,074
Thanks: 1
Thanked 38 Times in 37 Posts
Default

I don't think you can. This maybe possible in IE7 because they use a different way of rendering select boxes.
You have two alternatives, either ignore the click by storing the current position and checking in onchange to see if the click was on a valid option or by creating your own list box with DHTML.

--

Joe (Microsoft MVP - XML)
 
Old March 10th, 2006, 04:03 AM
Friend of Wrox
 
Join Date: Nov 2005
Posts: 223
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanx joe,

I thought so. I will use a alternative then.

__________________________________________________ ________
This is my junk I'm gona eat it





Similar Threads
Thread Thread Starter Forum Replies Last Post
wrap a select option nerssi HTML Code Clinic 0 June 16th, 2007 07:43 AM
option selected from a select box Adam H-W Classic ASP Basics 3 December 11th, 2006 11:09 AM
Disable "close window option" szms VB.NET 2002/2003 Basics 0 April 7th, 2005 11:46 AM
Select/Option Problem TSEROOGY Javascript 2 October 4th, 2004 03:32 PM
Getting select option name not value mildge Javascript How-To 2 April 5th, 2004 10:20 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.