Subscribe to Subscribers
Talk to Webmaster Tony John


Forums » .NET » JavaScript »

Radio button


Posted Date: 27 Sep 2009      Posted By:: sree     Member Level: Silver    Member Rank: 0     Points: 1   Responses: 2



HI,

In my page two radio button list
first radio button : LOW MEDIUM HIGH
Second radio button : A B C are there.
now when i select HIGH radiobutton the second Radio button list
should be disabled.

I am using vs 2005
I am using separae js file.
plz help me. i dont javascript.
what i tried is.

this function i want when radio button on click event.

function EnableSignoff()
{
if(document.getElementById.rdoGrading_0.checked)
{
document.getElementById.rdoSignOff_0.checked=true;
document.getElementById.rdoSignOff_0.disabled=true;
document.getElementById.rdoSignOff_1.disabled=true;
document.getElementById.rdoSignOff_2.disabled=true;
document.getElementById.rdoSignOff_3.disabled=true;
}
else
{
document.getElementById.rdoSignOff_0.disabled=false;
document.getElementById.rdoSignOff_1.disabled=false;
document.getElementById.rdoSignOff_2.disabled=false;
document.getElementById.rdoSignOff_3.disabled=false;
}

}
Thanx




Responses

#427582    Author: Raju Melveetilpurayil      Member Level: Gold      Member Rank: 90     Date: 27/Sep/2009   Rating: 2 out of 52 out of 5     Points: 2

try this

<asp:RadioButton ID="RadioButton3" runat="server" onclick="X();" />
<script language="javascript">
function X()
{

if(document.getElementById("RadioButton1").checked)
{
alert("x");
document.getElementById("RadioButton2").checked=true;
}
}
</script>

Nothing is Impossible... :)

My Forum :http://www.dotnetobject.com
what is opensource.net ??



 
#428339    Author: Shawpnendu bikash maloroy      Member Level: Silver      Member Rank: 0     Date: 30/Sep/2009   Rating: 2 out of 52 out of 5     Points: 2

You can read my below post. Here i showed how one can get selected value from radio button list. So that you can do anything if you know that on which button now user clicked from list of radio controls.

http://shawpnendu.blogspot.com/2009/08/how-to-read-asp-radio-button-list.html

Hope it will help you.



 
Post Reply

 This thread is locked for new responses. Please post your comments and questions as a separate thread.
If required, refer to the URL of this page in your new post.



Next : Computer jokes
Previous : how to get the selected text from the textarea or editor using javascript?
Return to Discussion Forum
Post New Message
Category:

Related Messages



Follow us on Twitter: https://twitter.com/dotnetspider

Active Members
TodayLast 7 Daysmore...

Awards & Gifts
Copyright © SpiderWorks Technologies Pvt Ltd., Kochi, India
2005 - 2012 All Rights Reserved.
.NET and other trademarks mentioned in this site belong to Microsoft and other respective trademark owners.
Articles, tutorials and all other content offered here is for educational purpose only.
We are not associated with Microsoft or its partners.