struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ashish Kulkarni" <ashish.kulkarn...@gmail.com>
Subject Issue with DHTML and DIV position
Date Tue, 02 May 2006 21:30:22 GMT
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>&nbsp; &nbsp;
      <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>

Mime
View raw message