Need HELP with a function

admin

Administrator
Staff member
I am trying to set the 'visibility' property for a text box (on a form) to 'visible' - based on the choice in the select box.

Am I even close?

>
function show2(){
var TimeType = document.frm.TypeOfTimeOff.value;

if(TimeType.value = "Medical Appt."){
frm.TimeOfAppt.style.visibility = "visible";
}
}


<SELECT size=1 name=TypeOfTimeOff>
<OPTION value=http://www.webdeveloper.com/forum/archive/index.php/Vacation selected>Vacation (Planned)</OPTION>
<OPTION value="Floating Holiday">Floating Holiday (Planned)</OPTION>
<OPTION value="Medical Appt." onChange="show2();">Medical Appt.</OPTION>
<OPTION value=Sickleave>Sick Leave (Unplanned)</OPTION>
<OPTION value=Leavewopay>LWOP (Approval req.)</OPTION>
<OPTION value="FMLA/LOA">FMLA/LOA (Approval req.)</OPTION>
<OPTION value="Jury Duty">Jury Duty</OPTION>
<OPTION value=bereavement>Bereavement</OPTION>
</SELECT>
 
Back
Top