»
EnglishFrenchVietnamese

Print - Pop-up Menu with Co-ordinate - JavaScriptBank.com

Full version: jsB@nk » Menu » Multilevel menu » Pop-up Menu with Co-ordinate
URL: https://www.javascriptbank.com/pop-up-menu-with-co-ordinate.html

Pop-up Menu with Co-ordinate © JavaScriptBank.comThis JavaScript allows you to associate a dynamic JavaScript menu with regular links on your page. As the mouse moves over the JavaScript link in menu, a JavaScript menu pops up containing "sub links". Beside, this JavaScript also displays the co-ordiante in the status bar.

Full version: jsB@nk » Menu » Multilevel menu » Pop-up Menu with Co-ordinate
URL: https://www.javascriptbank.com/pop-up-menu-with-co-ordinate.html



CSS
<style>    #menu {position:absolute;visibility:hidden;top:20;left:30;z-index:10;}/*background:"#000000";}*/    A {font-family:"Arial";color:"#000";text-decoration:none;}    A.menu {color:"#FFFFFF";text-decoration:none;}    A:Hover {color:"#FF0000";text-decoration:none;}  </style><!--    This script downloaded from www.JavaScriptBank.com    Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->


JavaScript
<script language="javascript">  <!--      var where = ""; // which link      var isNav = (navigator.appName == "Netscape") ? true:false;      function up(where) {       if(where == "j") {        if(isNav) {         document.menu.visibility = "show";        } else {           document.all('menu').style.visibility = "Visible";          }       }      }      function down() {       if(isNav) {        document.menu.visibility = "hidden";       } else {          document.all('menu').style.visibility = "hidden";         }      }      function checkwhere(e) {        if(isNav) {evt = e;}        else {evt = event;}        xCoord = window.evt.x;        yCoord = window.evt.y;        self.status = "x : "+ xCoord + "y : " + yCoord;         if(yCoord > 80) {down();}        if(xCoord > 280) {down();}      }      function nono(e) {       var code = isNav ? e.which:event.button       if(code == 2 || code == 3) {        alert("NO Stealing!!");       }      }           document.onmousemove = checkwhere;      document.onmousedown = nono;      if(isNav) {document.captureEvents(Event.MOUSEMOVE | Event.MOUSEDOWN);}  //-->  </script><!--    This script downloaded from www.JavaScriptBank.com    Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->


HTML
<a href="http://JavaScriptBank.com/" onmouseover="up('j');self.status='Jscript Index';return true">JavaScriptBank.com</a>    <div id="menu"><table border="1" cellpadding="0" cellspacing="0" bgcolor="#000000">                     <tbody><tr>                       <td><h6><a href="http://JavaScriptBank.com/" class="menu">Browser</a>                                         <a href="http://JavaScriptBank.com/" class="menu">Graphics</a>                                         <a href="http://JavaScriptBank.com/" class="menu">Security</a><br>                       <a href="http://JavaScriptBank.com/" class="menu">Games</a>                       <a href="http://JavaScriptBank.com/" class="menu">Others</a></h6></td>                                       </tr>                    </tbody></table>    </div><!--    This script downloaded from www.JavaScriptBank.com    Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->