Hide and show item as per the value of select list
Hi frnds,
I am facing a problem here.
i want to hide and show few items as per the value of a select list
For that i wrote a javascript function like this
<script language="JavaScript" type="text/javascript">
function Show_On_Select_Value(pThis, pThat, pValue){
var rv = document.getElementById(pThis).value;
var elm = document.getElementById(pThat);
if (rv == pValue) {
elm.style.display = "block";
} else {
elm.style.display = "none"; }
}
</script>
and i m calling the function frm the select list like this
onchange="Show_On_Select_Value('P5_HIGHER_EDUC','P5_TIME_TAKEN','Claimed');"
Here the problem is it is hiding the item , but label is still showing..
It means lable is not hiding.
If anybody can help me on this it'll be very helpfull for me.
Thanks in advance,
Kalesh.