Create a layer with a message on mouseover

E

effendi

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

Evertjan.

wrote on 14 mei 2005 in comp.lang.javascript:
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.

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

Thanks in advanced.

Not too advanced I hope.
 
L

Lee

(e-mail address removed) said:
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.

<html>
<head>
<style type="text/css">
#popup {position:absolute;
top:50; left:50;
z-index:1;
visibility:hidden;
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.parentNode.style.visibility='hidden'">Close</button>
</div>

<div>
<p>This is the main part of the page.
</p><p>You might want to read this <a href="#"
onclick="document.getElementById('popup').style.visibility='visible'">
Important Message</a>.</p>
<p>Or maybe not.</p>
</div>
</body>
</html>
 
A

Avar

Actually there is one pure CSS solution too:

<style>
/* CSS hack by :) McA (c) 2001 :) */
a.h:link{visibility:hidden;text-decoration:none}
a.h:visited{visibility:hidden;text-decoration:none}
a.h:hover{visibility:visible;text-decoration:none}
span.m{text-decoration:none;color:navy;position:absolute;background-color:li
ghtyellow;border:solid gray 1px;padding:8px}
span.v{visibility:visible;text-decoration:underline}
</style>
<body>
Some text <a href="#" class="h"><span class="v">Link</span>
<span class="m"><b>Important Notice</b><br><br>First line,<br>second
line,<br>etc</span></a> text continues

Avar Pentel
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,535
Members
45,007
Latest member
obedient dusk

Latest Threads

Top