Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    FTK
    FTK is offline
    New to the CF scene
    Join Date
    Aug 2002
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    how to create onmouseover popup which closes onmouseout ?

    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...

  • #2
    Regular Coder
    Join Date
    Jun 2002
    Posts
    626
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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,dire ctories=no,toolbar=no,scrollbars=no,menubar=no,resizable=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>

  • #3
    FTK
    FTK is offline
    New to the CF scene
    Join Date
    Aug 2002
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Thumbs up

    Yep this is exactly what i was looking for, thanx for the help

  • #4
    New to the CF scene
    Join Date
    Nov 2012
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by requestcode View Post
    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,dire ctories=no,toolbar=no,scrollbars=no,menubar=no,resizable=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?


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •