...

View Full Version : getting rid of a popup with onmouseout



johns311
04-14-2005, 01:32 AM
Is there a way get rid of this popup with a mouseout instead of clicking:


<HTML>
<HEAD>
<TITLE>Popup Example</TITLE>

<SCRIPT LANGUAGE="JScript">
var oPopup = window.createPopup();
function ButtonClick()
{
var oPopBody = oPopup.document.body;
oPopBody.style.backgroundColor = "lightyellow";
oPopBody.style.border = "solid black 1px";
oPopBody.innerHTML = "Click outside <B>popup</B> to close.";
oPopup.show(100, 100, 180, 25, document.body);
}
</SCRIPT>
</HEAD>

<BODY>
<BUTTON onclick="ButtonClick()">Click Me!</BUTTON>
</BODY>
</HTML>

Basscyst
04-14-2005, 02:01 AM
That code only works in IE. There are better ways to display a tool tip, which is what I am assuming you are loking for. Just to a google search for DHTML tool tips. There are many out there. I'm sure you can find one to suit your needs. In answer to your question though, no I don't believe so.

Basscyst

johns311
04-14-2005, 02:16 AM
That code only works in IE. There are better ways to display a tool tip, which is what I am assuming you are loking for. Just to a google search for DHTML tool tips. There are many out there. I'm sure you can find one to suit your needs. In answer to your question though, no I don't believe so.

Basscyst


Thanks for the reply. I am using popup for a popup menu. Is that a bad idea?
I just discovered that I could use <onmouseout="this.style.visibility='hidden';"> to get rid of the <div> but the popup window remains. is there a way to do a refresh on the page, or is using popup a stupid way to do a menu?



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum