This is a migrated thread and some comments may be shown as answers.

Disable combobox from client side

1 Answer 113 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
prem
Top achievements
Rank 1
prem asked on 20 Jan 2009, 06:59 PM
Hi,

Based on a radio button selection, I have to disable a radcombobox on the client side using javascript. how can this be accomplished?

I tried doing it in javascript :(onlick event of the radio button)

var

cmb = document.getElementById("<%= cmbVal.ClientID %>");
cmb.disabled = true;

where cmbVal --> radcombobox

It seems to work fine on IE 7 . But on firefox it doesn't disable at all. Is there a way I can make this work on all browsers.

Thanks.

 

1 Answer, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 21 Jan 2009, 05:36 AM
Hello Prem,

Try the folowing code in order to disable the ComboBox.

JavaScript:
var combo = $find("<%= cmbVal.ClientID %>"); 
combo.disable(); 

You can also refer folloeing link to online documentation which explains client side basics.
Client-Side Basics

Thanks,
Shinu.
Tags
ComboBox
Asked by
prem
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Share this question
or