MissD2U
01-06-2003, 01:22 PM
Can anyone please help me or give me suggestion on how to fix this problem. When I click on the different tabs, the elements from both forms show up instead of just one at a time. Here is the code behind it.....ANY suggestions or fixes will be welcomed!! :)
<BODY>
<script>
<!-- Begin
// ############## SIMPLE BROWSER SNIFFER
if (document.layers) {
navigator.family = "nn4"
}
if (document.all) {
navigator.family = "ie4"
}
if (window.navigator.userAgent.toLowerCase().match(/gecko/)) {
navigator.family = "gecko"
}
if (window.navigator.userAgent.toLowerCase().indexOf('opera') != -1) {
navigator.family = 'opera';
}
toplevel = "4";
function riseup (box) {
toplevel++;
if (navigator.family == "ie4"){
document.all[box].style.zIndex = toplevel;
}
if (navigator.family == "opera" || navigator.family == "gecko"){
document.getElementById(box).style.zIndex = toplevel;
}
}
//-->
</script>
<!--First Tab Data-->
<div id="box1" style="position:absolute; background-color:#d3d3d3; padding:5; visibility:show; left:10px; top:80px; width:350; height:300; z-index:4">
<form name="FormInsert" method="post" action="test.asp?SID=<%=SID%>&OID=<%=OID%>&ACT=INSERT">
<BR><BR>
<h3>Duty Position Web Application Admin</h3>
<b>Step 1:</b> <select id="selFunctArea" name="selFunctArea" language=javascript onchange="UpdateSelect('selDtyPos','FormInsert',this.options[this.selectedIndex].value,oDty); UpdateSelect('selDtyApps','FormInsert',this.options[this.selectedIndex].value,oApp);">
<option>[Select Functional Area]</OPTION>
</select>
<BR>
<b>Step 2:</b> <select id="selDtyPos" name="selDtyPos" language=javascript onchange="document.FormInsert.txtDtyID.value = this.options[this.selectedIndex].value;">
<option>[Select Duty Position]</option>
<option></option>
</select>
<BR>
<b>Step 3:</b> <select id="selDtyApps" name="selDtyApps" language=javascript onchange="UpdateSelect('selDtyMods','FormInsert',this.options[this.selectedIndex].value,oMod);">
<option>[Select Application]</option>
</select>
<BR>
<b>Step 4:</b> <select id="selDtyMods" name="selDtyMods" language=javascript onchange="UpdateSelect('selDtyProcs','FormInsert',this.options[this.selectedIndex].value,oProc);">
<option>[Select Module]</option>
</select>
<BR>
<b>Step 5:</b> <select id="selDtyProcs" name="selDtyProcs">
<option>[Select Process]</option>
</select>
<BR><BR>
<INPUT type="submit" value="Submit" id=submit1 name=submit1 onClick="return validateForm();">
<INPUT type="hidden" id="txtDtyID" name="txtDtyID">
</form>
</div>
<!--Second Tab Data-->
<div id="box2" style="position:absolute; background-color:#d3d3d3; padding:5; visibility:show; left:10px; top:80px; width:350; height:300; z-index:3">
<form name="FormCurrDtyApps" method="post" action="test.asp?SID=<%=SID%>&OID=<%=OID%>&ACT=SHOWCURAPPS">
<BR><BR>
<h3>Duty Position Web Application Admin</h3>
<SELECT id="selDtyPos_2" name="selDtyPos_2">
<OPTION>[Select Duty Position]</OPTION>
</SELECT>
<INPUT type="submit" value="Submit" id=submit3 name=submit3></td>
</form>
</div>
<div id="tab1" onclick="javascript:riseup('box1');" style="cursor:hand; position:absolute; background-color:#d3d3d3; visibility:show; left:10px; top:60px; width:65; height:20; z-index:3">
<b>Add Apps</b>
</div>
<div id="tab2" onclick="javascript:riseup('box2');" style="cursor:hand; position:absolute; background-color:#d3d3d3; visibility:show; left:75px; top:60px; width:65; height:20; z-index:3">
<b>Delete Apps</b>
</div>
<!-- THIS TABLE IS USED TO BLOCK THE AREA WHERE THE TABULAR NAV IS PLACED -->
<table width=400 height=300 align=left>
<tr>
<td> </td>
</tr>
</table>
<script>
// ################# THIS FIXES GECKO DIV PLACEMENT
<!--Begin
if (navigator.family == "gecko"){
for (x=1;x<6;x++) {
document.getElementById("tab"+x).style.left = 120;
}
}
// End -->
</script>
</BODY>
<BODY>
<script>
<!-- Begin
// ############## SIMPLE BROWSER SNIFFER
if (document.layers) {
navigator.family = "nn4"
}
if (document.all) {
navigator.family = "ie4"
}
if (window.navigator.userAgent.toLowerCase().match(/gecko/)) {
navigator.family = "gecko"
}
if (window.navigator.userAgent.toLowerCase().indexOf('opera') != -1) {
navigator.family = 'opera';
}
toplevel = "4";
function riseup (box) {
toplevel++;
if (navigator.family == "ie4"){
document.all[box].style.zIndex = toplevel;
}
if (navigator.family == "opera" || navigator.family == "gecko"){
document.getElementById(box).style.zIndex = toplevel;
}
}
//-->
</script>
<!--First Tab Data-->
<div id="box1" style="position:absolute; background-color:#d3d3d3; padding:5; visibility:show; left:10px; top:80px; width:350; height:300; z-index:4">
<form name="FormInsert" method="post" action="test.asp?SID=<%=SID%>&OID=<%=OID%>&ACT=INSERT">
<BR><BR>
<h3>Duty Position Web Application Admin</h3>
<b>Step 1:</b> <select id="selFunctArea" name="selFunctArea" language=javascript onchange="UpdateSelect('selDtyPos','FormInsert',this.options[this.selectedIndex].value,oDty); UpdateSelect('selDtyApps','FormInsert',this.options[this.selectedIndex].value,oApp);">
<option>[Select Functional Area]</OPTION>
</select>
<BR>
<b>Step 2:</b> <select id="selDtyPos" name="selDtyPos" language=javascript onchange="document.FormInsert.txtDtyID.value = this.options[this.selectedIndex].value;">
<option>[Select Duty Position]</option>
<option></option>
</select>
<BR>
<b>Step 3:</b> <select id="selDtyApps" name="selDtyApps" language=javascript onchange="UpdateSelect('selDtyMods','FormInsert',this.options[this.selectedIndex].value,oMod);">
<option>[Select Application]</option>
</select>
<BR>
<b>Step 4:</b> <select id="selDtyMods" name="selDtyMods" language=javascript onchange="UpdateSelect('selDtyProcs','FormInsert',this.options[this.selectedIndex].value,oProc);">
<option>[Select Module]</option>
</select>
<BR>
<b>Step 5:</b> <select id="selDtyProcs" name="selDtyProcs">
<option>[Select Process]</option>
</select>
<BR><BR>
<INPUT type="submit" value="Submit" id=submit1 name=submit1 onClick="return validateForm();">
<INPUT type="hidden" id="txtDtyID" name="txtDtyID">
</form>
</div>
<!--Second Tab Data-->
<div id="box2" style="position:absolute; background-color:#d3d3d3; padding:5; visibility:show; left:10px; top:80px; width:350; height:300; z-index:3">
<form name="FormCurrDtyApps" method="post" action="test.asp?SID=<%=SID%>&OID=<%=OID%>&ACT=SHOWCURAPPS">
<BR><BR>
<h3>Duty Position Web Application Admin</h3>
<SELECT id="selDtyPos_2" name="selDtyPos_2">
<OPTION>[Select Duty Position]</OPTION>
</SELECT>
<INPUT type="submit" value="Submit" id=submit3 name=submit3></td>
</form>
</div>
<div id="tab1" onclick="javascript:riseup('box1');" style="cursor:hand; position:absolute; background-color:#d3d3d3; visibility:show; left:10px; top:60px; width:65; height:20; z-index:3">
<b>Add Apps</b>
</div>
<div id="tab2" onclick="javascript:riseup('box2');" style="cursor:hand; position:absolute; background-color:#d3d3d3; visibility:show; left:75px; top:60px; width:65; height:20; z-index:3">
<b>Delete Apps</b>
</div>
<!-- THIS TABLE IS USED TO BLOCK THE AREA WHERE THE TABULAR NAV IS PLACED -->
<table width=400 height=300 align=left>
<tr>
<td> </td>
</tr>
</table>
<script>
// ################# THIS FIXES GECKO DIV PLACEMENT
<!--Begin
if (navigator.family == "gecko"){
for (x=1;x<6;x++) {
document.getElementById("tab"+x).style.left = 120;
}
}
// End -->
</script>
</BODY>