trying to get a javascript attached to a DataGrid RadioButtonList . I
have a similar thing working for a DDL so i copied that for the RBL.
It "errors" when i am trying to get the current selected value for the
RBL.
code in ItemDataBound:
rblDC.Attribute s.Add("onClick" , "rblDC_onClick( '" + lblDC.ClientID +
"', '" + rblDCodes.Clien tID + "', '" + e.Item.ItemType + "')");
Javascript:
function rblDC_onClick(l blDCId, rblDCId, eiT)
{
var lblDC = document.getEle mentById(lblDCI d);
var rblDC = document.getEle mentById(rblDCI d);
var rblDCSelection = rblDC.options[rblDC.selectedI ndex].value); <--
JS error
if (lblDC.innerTex t == rblDCSelection)
"do stuff"
}
the error i get says:
"options" is null or is not an object.
which, to noob me, says that it doesn't have a valid rblDC. not sure
though. could be a syntax error of sorts.
thank you
troy
have a similar thing working for a DDL so i copied that for the RBL.
It "errors" when i am trying to get the current selected value for the
RBL.
code in ItemDataBound:
rblDC.Attribute s.Add("onClick" , "rblDC_onClick( '" + lblDC.ClientID +
"', '" + rblDCodes.Clien tID + "', '" + e.Item.ItemType + "')");
Javascript:
function rblDC_onClick(l blDCId, rblDCId, eiT)
{
var lblDC = document.getEle mentById(lblDCI d);
var rblDC = document.getEle mentById(rblDCI d);
var rblDCSelection = rblDC.options[rblDC.selectedI ndex].value); <--
JS error
if (lblDC.innerTex t == rblDCSelection)
"do stuff"
}
the error i get says:
"options" is null or is not an object.
which, to noob me, says that it doesn't have a valid rblDC. not sure
though. could be a syntax error of sorts.
thank you
troy
Comment