problem in calling javascript function in radiobuttonList  
Author Message
Deathvalley





PostPosted: Fri Sep 23 12:02:56 CDT 2005 Top

ASP.Net >> problem in calling javascript function in radiobuttonList

Hi All,

there is a radiobuttonlist having 2 list items (state & zipcode).
when i select state radiobutton the zipcode textbox should be disabled
and when i select a zipcode radiobutton the state textbox should be
disabled. And i need to handle this in client side only.
i'm not able to call a javascript function for radiobuttonlist.
can please some one help me to get out of this...

advance thanks
Mahi



--
novice_developer
------------------------------------------------------------------------
Posted via http://www.hide-link.com/
------------------------------------------------------------------------

Web Programming169  
 
 
Siva





PostPosted: Fri Sep 23 12:02:56 CDT 2005 Top

ASP.Net >> problem in calling javascript function in radiobuttonList In the page_load event, have:

RadioButtonList.Items[0].Attributes.Add("onclick", "document.forms[0]." +
txtZip.ClientID + ".disabled=true;" + txtState.ClientID +
".disabled=false;"); //Item 0 is State
RadioButtonList.Items[1].Attributes.Add("onclick", "document.forms[0]." +
txtZip.ClientID + ".disabled=false;" + txtState.ClientID +
".disabled=true;"); // Item 1 is Zip

Hope this helps.




Hi All,

there is a radiobuttonlist having 2 list items (state & zipcode).
when i select state radiobutton the zipcode textbox should be disabled
and when i select a zipcode radiobutton the state textbox should be
disabled. And i need to handle this in client side only.
i'm not able to call a javascript function for radiobuttonlist.
can please some one help me to get out of this...

advance thanks
Mahi



--
novice_developer
------------------------------------------------------------------------
Posted via http://www.codecomments.com
------------------------------------------------------------------------