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 3 of 3
  1. #1
    New Coder
    Join Date
    Mar 2005
    Posts
    27
    Thanks
    0
    Thanked 0 Times in 0 Posts

    getting rid of a popup with onmouseout

    Is there a way get rid of this popup with a mouseout instead of clicking:

    Code:
    <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>

  • #2
    Smokes a Lot
    Join Date
    Jul 2003
    Location
    CA, USA
    Posts
    1,594
    Thanks
    5
    Thanked 20 Times in 20 Posts
    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
    Last edited by Basscyst; 04-14-2005 at 01:04 AM.
    Helping to build a bigger box. - Adam Matthews

  • #3
    New Coder
    Join Date
    Mar 2005
    Posts
    27
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by Basscyst
    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?


  •  

    Posting Permissions

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