Hey all...
I have this form that someone asked me to help with. If you view the page at you will see my issue.
I want the form elements to show up in the same place each time. Currently they are showing up below each other. I am not skilled enough in CSS positioningto do this right.
Any help is appreciated.
<html>
<title></title>
<head>
<script>
ns4 = (document.layers) ? true:false
ie4 = (document.all) ? true:false
ng5 = (document.getElementById) ? true:false
function hideSec() {
if (ng5) document.getElementById('sec1').style.visibility = "hidden"
else if (ns4) document.sec1.visibility = "hide"
else if (ie4) sec1.style.visibility ="hidden"
if (ng5) document.getElementById('sec2').style.visibility = "hidden"
else if (ns4) document.sec2.visibility = "hide"
else if (ie4) sec2.style.visibility ="hidden"
if (ng5) document.getElementById('sec3').style.visibility = "hidden"
else if (ns4) document.sec3.visibility = "hide"
else if (ie4) sec3.style.visibility ="hidden"
}
function showSec {
hideSec();
if (ng5) document.getElementById('sec' + n).style.visibility = "visible";
else if (ns4) document.layers["sec" + n].visibility = "show";
else if (ie4) document.all["sec" + n].style.visibility = "visible";
}
</script>
</head>
<body onload="hideSec()">
<a href="JavaScript:showSec(1)">Search by Lab</a>
<a href="JavaScript:showSec(2)">Search by Model</a>
<a href="JavaScript:showSec(3)">Search by Type</a>
<div ID="sec1" {position: absolute; top: 175px; left:235px;visibility:hidden; z-index: -1;}>
<form method="post" action="searchModels.asp">
Search by Lab<input type="text" name="Lab">
<input type="Submit" value="Submit">
</form>
</div>
<div ID="sec2" {position: absolute; top: 175px; left:235px;visibility:hidden; z-index: -2;}>
<form method="post" action="searchModels.asp">
Search by Model<input type="text" name="Name">
<input type="Submit" value="Submit">
</form>
</div>
<div ID="sec3" {position: absolute; top: 175px; left:235px;visibility:hidden; z-index: -3;}>
<form method="post" action="searchModels.asp">
Search by Type<input type="text" name="Type">
<input type="Submit" value="Submit">
</form>
</div>
</body>
</html>
I have this form that someone asked me to help with. If you view the page at you will see my issue.
I want the form elements to show up in the same place each time. Currently they are showing up below each other. I am not skilled enough in CSS positioningto do this right.
Any help is appreciated.
<html>
<title></title>
<head>
<script>
ns4 = (document.layers) ? true:false
ie4 = (document.all) ? true:false
ng5 = (document.getElementById) ? true:false
function hideSec() {
if (ng5) document.getElementById('sec1').style.visibility = "hidden"
else if (ns4) document.sec1.visibility = "hide"
else if (ie4) sec1.style.visibility ="hidden"
if (ng5) document.getElementById('sec2').style.visibility = "hidden"
else if (ns4) document.sec2.visibility = "hide"
else if (ie4) sec2.style.visibility ="hidden"
if (ng5) document.getElementById('sec3').style.visibility = "hidden"
else if (ns4) document.sec3.visibility = "hide"
else if (ie4) sec3.style.visibility ="hidden"
}
function showSec {
hideSec();
if (ng5) document.getElementById('sec' + n).style.visibility = "visible";
else if (ns4) document.layers["sec" + n].visibility = "show";
else if (ie4) document.all["sec" + n].style.visibility = "visible";
}
</script>
</head>
<body onload="hideSec()">
<a href="JavaScript:showSec(1)">Search by Lab</a>
<a href="JavaScript:showSec(2)">Search by Model</a>
<a href="JavaScript:showSec(3)">Search by Type</a>
<div ID="sec1" {position: absolute; top: 175px; left:235px;visibility:hidden; z-index: -1;}>
<form method="post" action="searchModels.asp">
Search by Lab<input type="text" name="Lab">
<input type="Submit" value="Submit">
</form>
</div>
<div ID="sec2" {position: absolute; top: 175px; left:235px;visibility:hidden; z-index: -2;}>
<form method="post" action="searchModels.asp">
Search by Model<input type="text" name="Name">
<input type="Submit" value="Submit">
</form>
</div>
<div ID="sec3" {position: absolute; top: 175px; left:235px;visibility:hidden; z-index: -3;}>
<form method="post" action="searchModels.asp">
Search by Type<input type="text" name="Type">
<input type="Submit" value="Submit">
</form>
</div>
</body>
</html>