Hi,
i am using this show/hide function
I have a drop down list with three choices, Yes, No and Not Applicable. For instance I select only Yes for the show/hide function then the date text box comes up..
.
Now i have added the "No" as well, for instance, when the user selects "NO", "Meeting Offered" drop down should come up. But my problem is now i have to do it for Not Applicable(NA) and it is not working?? In other words, when the user clicks on NA some "Meeting Offered" drop down box should come up,
can anybody can help please???
This is my form with the drop down box:
i am using this show/hide function
Code:
<script type="text/javascript"><!-- var lastDiv1 = ""; function showDiv1(divName) { // hide last div if (lastDiv1) { document.getElementById(lastDiv1).className = "hiddenDiv"; } //if value of the box is not nothing and an object with that name exists, then change the class if (divName && document.getElementById(divName)) { document.getElementById(divName).className = "visibleDiv"; lastDiv1 = divName; } } //--> </script> <style type="text/css" media="screen"><!-- .hiddenDiv { display: none; } .visibleDiv { display: block; border: 1px grey solid; } --></style> </script> <script type="text/javascript"><!-- var lastDiv2 = ""; function showDiv2(divName) { // hide last div if (lastDiv2) { document.getElementById(lastDiv2).className = "hiddenDiv"; } //if value of the box is not nothing and an object with that name exists, then change the class if (divName && document.getElementById(divName)) { document.getElementById(divName).className = "visibleDiv"; lastDiv2 = divName; } } //--> </script> <style type="text/css" media="screen"><!-- .hiddenDiv { display: none; } .visibleDiv { display: block; border: 1px grey solid; } --></style> </script>

Now i have added the "No" as well, for instance, when the user selects "NO", "Meeting Offered" drop down should come up. But my problem is now i have to do it for Not Applicable(NA) and it is not working?? In other words, when the user clicks on NA some "Meeting Offered" drop down box should come up,
can anybody can help please???
This is my form with the drop down box:
Code:
<select name="Skip_Level_Meeting" size="1" onchange="showDiv1(this.value);" > <option value="" >Choose One...</option > <option value="Yes" >Yes</option> <option value="No" >No</option> <option value="N/A">N/A (I have declined to take up this opportunity) </option> </select ><br> <p id="Yes" class="hiddenDiv"> <font size="2" face="Times New Roman">8)Date <input type="text" id="cal3" name="SLM_Date" value="<%=Request.Form("SLM_Date")%>" size="13" /> <input type="image" name="submit10" img src="calender/calender.bmp" id="calb3" width="30" height="31" start="fileopen"></font> <font face=" Times New Roman"> <font size="2" face="Times New Roman"> <script type="text/javascript"> Calendar.setup({ inputField : "SLM_Date", button : "calb3", align : "Tr" }); </script> <p id="No" class="hiddenDiv"> <legend> </legend> 9) Meeting Offered <select name="SLM_Meeting_Offered" size="1" onchange="showDiv2(this.value);" > <option value="" >Choose One...</option > <option value="Yes 1 " >Yes</option> <option value="No 1 " >No</option> </select ><br> <p id="Yes 1 " class="hiddenDiv"> 10</font><font face="Times New Roman" size="5"><font size="2" face="Times New Roman">) Date offered <input type="text" id="cal9" name="SLM_Date_Offered" value="<%=Request.Form("SLM_Date_Offered")%>" size="13" /> <input type="image" name="submit11" img src="calender/calender.bmp" id="calb9" width="30" height="31" start="fileopen"></font> <script type="text/javascript"> Calendar.setup({ inputField : "SLM_Date_Offered", button : "calb9", align : "Tr" }); </script>
Comment