Click here to Skip to main content
16,021,211 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
How to write Javascript For following code?

C#
if (((rbShapeList.SelectedIndex == 0) || (rbShapeList.SelectedIndex == 1)) && rblistColor.SelectedIndex == 1)     ctl00_ContentPlaceHolder1_DxPanel1_rbShapeList	  ctl00_ContentPlaceHolder1_DxPanel3_rblistColor
            {
                PanShape.Visible = false;
                rbShapeList.RepeatDirection = RepeatDirection.Vertical;
                rbShapeList.Height = 66;

                PanFancyShape.Height = 134;

                PanCut.Enabled = true;
            }
Posted
Updated 22-Feb-12 0:55am
v2
Comments
CRDave1988 22-Feb-12 6:55am    
What u want to do? is not clear.
Varun Sareen 22-Feb-12 6:56am    
what you want to achieve from this code?
BobJanova 22-Feb-12 9:45am    
Unclear

1 solution

function SelectedRdValue(theField)
{
if(theField==null){ return true; }

for (i = 0; i < theField.length; i++)
{
if(!theField[i].disabled)
{
if (theField[i].checked)
{
//flag= true;
return theField[i].value;
}

}
}
return null;
}

Call DisableMpDmLoad()any event



function DisableMpDmLoad()
{
var Form=document.frmCJApplication;


var theField=Form.rdoCategory ;
if(SelectedRdValue(Form.rdoDomecile)=="N")
{

for (i = 0; i < theField.length; ++i)
{
//flag= true;
if(theField[i].value="UR")
{
theField[i].checked=true;
document.getElementById('rdoCategory').disabled=true;
}
}


}

}
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900