...

View Full Version : how to create onmouseover popup which closes onmouseout ?



FTK
08-01-2002, 01:50 PM
ok, the idea would be to create a popup which opens when you place your mouse on top of a link, and when you take your mouse off from the link the popup automaticly closes.
here is an example.
http://www.i-war2.com/downloads.htm
what im trying to do is to make it do what it does on that site when you place your mouse on top of the dload url:s
but by opening a new external html instead of using a help popup like is used on that site...

requestcode
08-01-2002, 02:11 PM
How about this:
<html>
<head>
<title>Mouse Position</title>
<SCRIPT LANGUAGE=JavaScript1.2>
<!--//
function winopen(e,linkid)
{
if(document.all)
{
leftpos=event.screenX;
toppos=event.screenY;
}
if(document.layers||document.getElementById)
{
leftpos=e.screenX;
toppos=e.screenY;
}
toppos=toppos+10
MessageWin=eval('window.open(linkid,"newwin",config="width=200,height=100,location=no,status=no,directories=no,toolbar=no,scrollbars=no,menubar=no,resiza ble=no,top='+toppos+',left='+leftpos+'")');
MessageWin.focus()
}
//-->
</SCRIPT>
</head>
<body >
<CENTER>
<BR><BR>
<A HREF="#" onMouseOver="winopen(event,'page1.html')" onMouseOut="MessageWin.close()">Open Window</A>
<BR><BR>
<A HREF="#" onMouseOver="winopen(event,'page2.html')" onMouseOut="MessageWin.close()">Open Window</A>
</CENTER>
</body>
</html>

FTK
08-01-2002, 09:53 PM
Yep this is exactly what i was looking for, thanx for the help :thumbsup:

melvintcs
11-15-2012, 01:29 AM
How about this:
<html>
<head>
<title>Mouse Position</title>
<SCRIPT LANGUAGE=JavaScript1.2>
<!--//
function winopen(e,linkid)
{
if(document.all)
{
leftpos=event.screenX;
toppos=event.screenY;
}
if(document.layers||document.getElementById)
{
leftpos=e.screenX;
toppos=e.screenY;
}
toppos=toppos+10
MessageWin=eval('window.open(linkid,"newwin",config="width=200,height=100,location=no,status=no,directories=no,toolbar=no,scrollbars=no,menubar=no,resiza ble=no,top='+toppos+',left='+leftpos+'")');
MessageWin.focus()
}
//-->
</SCRIPT>
</head>
<body >
<CENTER>
<BR><BR>
<A HREF="#" onMouseOver="winopen(event,'page1.html')" onMouseOut="MessageWin.close()">Open Window</A>
<BR><BR>
<A HREF="#" onMouseOver="winopen(event,'page2.html')" onMouseOut="MessageWin.close()">Open Window</A>
</CENTER>
</body>
</html>

i having problem if using IE browser, u try to resize and drag the window to bottm right of the screen. now you can try mouseOver the link and see what happen... :(
any solution for this?



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum