Create a layer with a message on mouseover

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • effendi@epitome.com.sg

    #1

    Create a layer with a message on mouseover

    I know this sounds like javascript menu and perhaps it is, but I have
    taken a look at menu codes and found it too difficult to revamp
    quickly. What I would like to do is a place a text is my webform. This
    text is labelled "Important Notice". Onmouseover, I like to call
    another layer which basically contains the notice without opening
    another window. Onmouseout, the layer disapper. Can someone give me an
    idea how this can be done quickly.

    Thanks in advanced.

  • Evertjan.

    #2
    Re: Create a layer with a message on mouseover

    wrote on 14 mei 2005 in comp.lang.javas cript:
    [color=blue]
    > I know this sounds like javascript menu and perhaps it is, but I have
    > taken a look at menu codes and found it too difficult to revamp
    > quickly. What I would like to do is a place a text is my webform. This
    > text is labelled "Important Notice". Onmouseover, I like to call
    > another layer which basically contains the notice without opening
    > another window. Onmouseout, the layer disapper. Can someone give me an
    > idea how this can be done quickly.[/color]

    I use Overlib for years now, very versatile and handy:

    <http://www.bosrup.com/web/overlib/>
    [color=blue]
    > Thanks in advanced.[/color]

    Not too advanced I hope.

    --
    Evertjan.
    The Netherlands.
    (Replace all crosses with dots in my emailaddress)

    Comment

    • Lee

      #3
      Re: Create a layer with a message on mouseover

      effendi@epitome .com.sg said:[color=blue]
      >
      >I know this sounds like javascript menu and perhaps it is, but I have
      >taken a look at menu codes and found it too difficult to revamp
      >quickly. What I would like to do is a place a text is my webform. This
      >text is labelled "Important Notice". Onmouseover, I like to call
      >another layer which basically contains the notice without opening
      >another window. Onmouseout, the layer disapper. Can someone give me an
      >idea how this can be done quickly.
      >
      >Thanks in advanced.[/color]

      <html>
      <head>
      <style type="text/css">
      #popup {position:absol ute;
      top:50; left:50;
      z-index:1;
      visibility:hidd en;
      border-width:5px;
      border-style:groove;
      background-color:#FFFFCC;
      text-align:center;
      padding:1em;
      }
      </style>
      </head>
      <body>

      <div id="popup">
      <h3>Important Notice</h3>
      <p>This is the popup text message.<p>
      <p>This is also part of the text.</p>
      <button onclick="this.p arentNode.style .visibility='hi dden'">Close</button>
      </div>

      <div>
      <p>This is the main part of the page.
      </p><p>You might want to read this <a href="#"
      onclick="docume nt.getElementBy Id('popup').sty le.visibility=' visible'">
      Important Message</a>.</p>
      <p>Or maybe not.</p>
      </div>
      </body>
      </html>

      Comment

      • Avar

        #4
        Re: Create a layer with a message on mouseover

        Actually there is one pure CSS solution too:

        <style>
        /* CSS hack by (: McA (c) 2001 :) */
        a.h:link{visibi lity:hidden;tex t-decoration:none }
        a.h:visited{vis ibility:hidden; text-decoration:none }
        a.h:hover{visib ility:visible;t ext-decoration:none }
        span.m{text-decoration:none ;color:navy;pos ition:absolute; background-color:li
        ghtyellow;borde r:solid gray 1px;padding:8px }
        span.v{visibili ty:visible;text-decoration:unde rline}
        </style>
        <body>
        Some text <a href="#" class="h"><span class="v">Link</span>
        <span class="m"><b>Im portant Notice</b><br><br>Firs t line,<br>second
        line,<br>etc</span></a> text continues

        Avar Pentel


        Comment

        Working...