I'm using check box widget, in that i have loaded custom list(School,Transport,Taxi,Other). and i have another textbox widget. i use a JS script to listen the checkbox item, once the other is selected i want the text box visible, else not. it is work that once other is selected alone the textbox visible, but after that it unchecked means it is not geting in visible. i use the below given code.
// Conditional statement to check the Checkbox selectedValue
if(CheckOther(id_custype.getSelectedValue())){
id_pleasespecify.setVisible(true);
}
else{
id_pleasespecify.setVisible(false);// text box widget visiblity property cal
}
// Function used to check the Checkbox content
function CheckOther(value){
// Conditional statement to check the index of "Other"
if(value.indexOf('"Other"') != -1){
return true;
}
else{
return false;
}
}