Saturday, January 28, 2012

How to show popup window onMouseOver () using JavaScript


  <script language="javascript" type="text/javascript">

      var popupWindow = null;
      function Popup(status, url) {
          if (status != 0) {
              if (popup != null) popup.focus();
              else {
                  var popup = open(url, "popups", "width=500,height=500");
                  popupWindow = popup;
              }
          }
          else {
              if (popupWindow != null) {
                  popupWindow.close();
              }
          }
      }
</script>
                
HTML Code-Sample:

<a href="#" onMouseover="Popup(1,www.code-sample.com')" onMouseout="Popup(0)"> Mouse on here!!!!!</a>

2 comments:

Unknown said...

Great!!

Unknown said...
This comment has been removed by the author.