My contemplations and diurnal novelties are publicized here


Its pretty simple all you need to do is to add

disabled=”disabled”

You can remove similar items from other dropdown using following code

$(‘#ddl1’).change(function() {
$(“# ddl2 > option”).each(function(){
if($(‘# ddl1 option:selected’).text() == this.text)
{
$(this).attr(‘disabled’,’disabled’);
}
else
{
$(this).removeAttr(‘disabled’);
}
});

To that specific element which you want to disable

<select id=”CIlof” name=”CIlof”>
<option label=”Please Select” value=””>Please Select</option>
<option label=”LABEL-1″ value=”001-LABEL”>LABEL</option>
<option disabled=”disabled” value=”005-VALUE2″ label=”LABEL-2″>LABEL-2</option>
</select>

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: