You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Ashish Kulkarni <as...@gmail.com> on 2006/05/02 23:30:22 UTC
Issue with DHTML and DIV position
Hi
I am attaching a html file along this mail, and also posting a shorttext URL
to view the html file
What i basically want to do is get the div with id="showtwo" below the 2
link displayed
Can anyone help with this issue
The code link is
http://www.shortText.com/*zlj8z* <http://www.shorttext.com/zlj8z>
or you can download the html file along this mail, or the get the html text
pasted in this mail
<html>
<head>
<title>Postion Text</title>
<script language="JavaScript">
function hideAll()
{
document.getElementById("showone").style.visibility='hidden';
document.getElementById("showtwo").style.visibility='hidden';
}
function showOne()
{
hideAll();
document.getElementById("showone").style.visibility='visible';
}
function showTwo()
{
hideAll();
document.getElementById("showtwo").style.visibility='visible';
}
</script>
</head>
<body>
<div id="top_div">
<table width="100%" align="center">
<tr >
<td>
<a href="javascript:showOne();">Show One</a>
<a href="javascript:showTwo();">Show Two</a>
</td>
</tr>
</table>
</div>
<div id="showone" style="visibility= visible; position: relative;">
<table width="100%" align="center">
<tr >
<td height="100px;">
This is showing number one DIV
</td>
</tr>
</table>
</div>
<div id="showtwo" style="visibility= hidden; position: relative;">
<table width="100%" align="center">
<tr >
<td height="100px;">
DIV Number 2 is showed now
</td>
</tr>
</table>
</div>
</body>
</html>