SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    webdesign Percept's Avatar
    Join Date
    Jan 2003
    Location
    Belgium
    Posts
    397
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Show/hide table with links

    The subject says it all ... I would like to show a table ( wich contains links ) when "onmouseover" a tablerow.

    this is the code for the row ( so far )
    Code:
     
    <tr onMouseOver="document.getElementById("submenu1").style.visibility = visible"> 
    <td background="layout/hoofdmenu-achtergrond.gif"><img src="layout/hoofdmenu-achtergrond.gif" width="1" height="26"></td>
    <td background="layout/hoofdmenu-achtergrond.gif">&nbsp;</td>
    </tr>

    and this is the table I want to show hide:

    Code:
    table ID="submenu1" class="menu1" width="100" border="1" cellspacing="0" cellpadding="0">
      <tr>
    	<td width="10">&nbsp;</td>
    	<td width="169">&nbsp;</td>
      </tr>
      <tr>
    	<td>&nbsp;</td>
    	<td>&nbsp;</td>
      </tr>
      <tr>
    	<td>&nbsp;</td>
    	<td>&nbsp;</td>
      </tr>
    </table>
    I'm obviously not good with javascript / DHTML so if anyone could help me with this it would be much appreciated.

    Thanks in advance,
    Percept.


  2. #2
    SitePoint Wizard silver trophy
    Join Date
    May 2003
    Posts
    1,843
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    CSS properties are strings:

    <tr onMouseOver="document.getElementById("submenu1" ).style.visibility = 'visible'">

  3. #3
    webdesign Percept's Avatar
    Join Date
    Jan 2003
    Location
    Belgium
    Posts
    397
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Thanks Adios.

    Platinum has helped me true MSN and it's all good

    Code:
     
    <script>
    function hide(){
    document.getElementById("thediv").style.display='none'; }
    function show(){
    document.getElementById("thediv").style.display=''; }
    </script>
    <a href="#" onMouseOver="hide()">Hide</a>
    <a href="#" onMouseOver="show()">Show</a>
    <div id="thediv">Test</div>
    


  4. #4
    + platinum's Avatar
    Join Date
    Jun 2001
    Location
    Adelaide, Australia
    Posts
    6,441
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    damm - now my code will be ripped to pieces hehe

  5. #5
    webdesign Percept's Avatar
    Join Date
    Jan 2003
    Location
    Belgium
    Posts
    397
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    As long as it's just the code



Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •