<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <title>Hide / Show DIV</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <style type="text/css"> <!-- .demo { color:#000033; background-color:#cccccc; layer-background-color:#cccccc; position:absolute; bottom:10px; width:800px; height:100px; visibility:hidden; } --> </style> <script type="text/javascript"> <!-- function toggleBox(szDivID, iState) // 1 visible, 0 hidden { if(document.layers) //NN4+ { document.layers[szDivID].visibility = iState ? "show" : "hide"; } else if(document.getElementById) //gecko(NN6) + IE 5+ { var obj = document.getElementById(szDivID); obj.style.visibility = iState ? "visible" : "hidden"; } else if(document.all) // IE 4 { document.all[szDivID].style.visibility = iState ? "visible" : "hidden"; } } // --> </script> </head> <body> <div ID="demodiv" class="demo"> <table> <tr> <td>Rules</td> </tr> <tr> <td>Minimum Stay</td> <td>1 day</td> </tr> <tr> <td>Maximum Stay</td> <td>1 year</td> </tr> </table> </div> <table> <tr> <td bgcolor="#006699" onMouseOver="this.bgColor = '#C0C0C0'; this.style.color='#000000';toggleBox('demodiv',1);style.cursor='hand'" onMouseOut="this.bgColor = '#006699'; this.style.color='#FFFFFF';"><font color="#FFFFFF" face="verdana" size="-2">Show DIV</font></td> <td bgcolor="#006699" onMouseOver="this.bgColor = '#C0C0C0'; this.style.color='#000000';toggleBox('demodiv',0);style.cursor='hand'" onMouseOut="this.bgColor = '#006699'; this.style.color='#FFFFFF';"><font color="#FFFFFF" face="verdana" size="-2">Hide DIV</font></td> </tr> </table> </body> </html>
Jump To Top of Thread