Mouseout Hides Popup

[Total: 0    Average: 0/5]

Create a popup on a mouse over – hide it on mouse out.

Body Code:

<script>
var oPopup=null;
function popStatus(siteStatus){ 
oPopup = window.open(); 
var oPopupBody = oPopup.document.body; 
oPopupBody.style.border = "1px black solid" ;
oPopupBody.innerHTML = siteStatus ;
} 
function closeWin()
{
  if(oPopup)
  {
    oPopup.close();
    oPopup=null;
  }
}
</script>
<a href="javascript:popStatus('message 1')">open popup on click</a>
<BR>
<a href="javascript:closeWin()">close popup on click</a>
<BR>
<a href="#" onmouseover="popStatus('second message')" onmouseout="closeWin()">mouse over me and then out</a>

Times Viewed: 3

Leave a Reply

Your email address will not be published. Required fields are marked *