Hi expert,
Please give a look on the following codes (specially on ComboText function). The code
ctlComboBox.className doesnt return any value. Why?
Code------------
<script type="text/javascript" language="JavaScript1.2">
function ComboText(ctlComboBox,ctlH
idden)
{
val=ctlComboBox.value;
cla=ctlComboBox.className;
//doesnt work
alert(ctlComboBox.classNam
e); //shows blank space
for ( i = 0; i < ctlComboBox.options.length
; i++ )
{
alert(ctlComboBox.options(
i).classNa
me); //works
if (ctlComboBox.options(i).va
lue==val && ctlComboBox.options(i).cla
ssName==cl
a)
{
ctlHidden.value=ctlComboBo
x.options(
i).text;
}
}
}
</script>
<select name="placeofbirth" id="placeofbirth" onChange="ComboText(frm.pl
aceofbirth
,frm.Birth
_Place_Tex
t)">
<input name="Birth_Place_Text" type="hidden" id="Birth_Place_Text">
Regards,
Raju
Start Free Trial