Snap Builder Public Codes Library
Snap | Generators | Login | Browse | Search | Enter Code | Export Snap Builder Public Codes Library

 

Category: Javascript Codes Library >> Navigation / Menus >> Multiple Form Buttons Open Hidden DIV Layers Menu


Code Snippet </> Info


Snippet Name: Multiple Form Buttons Open Hidden DIV Layers Menu

Description: Multiple form buttons that open hidden DIV layers.

Compatible Browsers:
Chrome BrowserFirefox BrowserInternet Explorer BrowserOpera BrowserSafari Browser


Example: View Code Demo

Note: Add as many form buttons and hidden DIV's as you need.

Author: Sandeep Gangadharan

Last Modified: 2015-08-26 23:34:18

Language: javascript

Highlight Mode: javascript

Copy Codes: Use Free Notepad ++
Bookmark and Share

Snap HTML Code Editor:
Paste the source code, make changes and instantly see it in live preview.
Snap HTML Code Editor


  About Copying

<!DOCTYPE html> <head> <title>Multiple Form Buttons Open Hidden DIV Layers Menu Javascript Code Snippet</title> <style> BODY {font-family:verdana,arial,ms sans serif; font-size:90%; color:#000000;} a:link {color:#0000ff; text-decoration:none;} /* unvisited link */ a:visited {color:#0000ff; text-decoration:none;} /* visited link */ a:hover {color:#007730; text-decoration:underline;} /* mouse over link */ a:active {color:#00ff00; text-decoration:underline;} /* selected link */ .boxit { position:absolute; top:90px; left:10px; width:auto; height:16px; padding:8px 8px 8px 8px; border:solid 1px beveled; background-color:#e6e6e6; box-shadow:0px 0px 6px rgba(0, 0, 0, 0.5); -moz-box-shadow:0px 0px 6px rgba(0, 0, 0, 0.5); -webkit-box-shadow:0px 0px 6px rgba(0, 0, 0, 0.5); text-shadow:0px 1px 0px rgba(0,0,0,0.4); } </style> <script> <!-- /* Begin Multiple Form Buttons Open Hidden DIV Layers Menu == This Script Free To Use Providing This Notice Remains == == This Script Has Been Found In The http://snapbuilder.com Free Public Codes Library == == NOTICE: Though This Material May Have Been In A Public Depository, Certain Author Copyright Restrictions May Apply == == Created by: Sandeep Gangadharan : http://sivamdesign.com/scripts/ : Creative Commons License == == Modified by: SnapBuilder.com == */ (document.getElementById) ? dom = true : dom = false; function hideIt(add) { if (dom) {document.getElementById('DivLayer'+add).style.visibility='hidden';} if (document.layers) {document.layers["DivLayer"+add].visibility='hide';} } function showIt(add) { if (dom) { if (document.getElementById('DivLayer'+add).style.visibility=='visible') { hideIt(add); } else {document.getElementById('DivLayer'+add).style.visibility='visible'} } if (document.layers) { if (document.layers["DivLayer"+add].visibility=='show') { hideIt(add); } else {document.layers["DivLayer"+add].visibility='show'} } window.setTimeout(function() { hideIt(add); }, 5000); // time for the DIV box to automatically close - each 1000 = 1 second } // --> </script> </head> <body> <div id="DivLayer1" class="boxit" style="visibility:hidden" onclick="windows.setTimeout(hideIt(), 5000);"> <a href="http://snapbuilder.com">SnapBuilder</a> |  <a href="http://sivamdesign.com/scripts/">Sivan Design</a> |  <a href="http://www.sitepronews.com">SiteProNews</a> |  <a href="http://www.exactseek.com">ExactSeek</a> </div> <div id="DivLayer2" class="boxit" style="visibility:hidden"> <a href="http://www.microsoft.com/">Microsoft Corp.</a> | <a href="http://home.netscape.com/">Netscape Corp.</a> | <a href="http://www.macromedia.com.html">Macromedia Inc.</a> | <a href="http://www.symantec.com">Symantec Corp.</a> </div> <div id="DivLayer3" class="boxit" style="visibility:hidden"> This could be useful not only for links but also for the purpose of popup information! </div> <form name="button1"><input type="Button" value="Open Menu Bar #1" onClick="javascript:showIt(1);"></form> <form name="button2"><input type="Button" value="Open Menu Bar #2" onClick="javascript:showIt(2);"></form> <form name="button3"><input type="Button" value="Open Menu Bar #3" onClick="javascript:showIt(3);"></form> <br /><br /> <div id="snippet"> [ This code example from <a href="http://snapbuilder.com/code_snippets/copy_code_snippet_77.html">Multiple Form Buttons Open Hidden DIV Layers Menu</a> page. ] </div> </body> </html>


[ Snippet Options ]

 

© 2002 -  Snap Builder Public Codes Library