moving the mouse over a button and related links associated with .

J

jdq

I would like to know how to show related links when I place the mouse on a
button. Example: I create a table with buttons such as "About Us" When I
hover over the "About Us" words, I would like to see topics underneath that
button such as "mission", "over view" etc. How do I create that?
 
K

Kevin Spencer

Hi jdq,

It sounds like you want to display the information in the page, rather than
as a tooltip or popup, am I correct? If so, it's a fairly simple task. You
just create a div under the button that has the text you want displayed when
the mouse is over the button, and add an "onmouseover" event handler in
JavaScript for the button that sets the div's style.display to "inline." You
also add an "onmouseout" event handler to the div that sets the div's
style.display to "none." You initially set the div's style.display to
"none." Example:

<form>
<p><input type="button"
onmouseover="document.getElementById('mydiv').style.display='inline'"
onmouseout="document.getElementById('mydiv').style.display='none'"
value="Hover mouse over this to display text" name="B1"></p>
<div id="mydiv" style="display:none">This is a button</div></body>
</form>

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
What You Seek Is What You Get.
 
J

Jim Buyens

Please consult:

Creating DHTML Menus in FrontPage 2003
http://www.interlacken.com/winnt/tips/tipshow.aspx?tip=28

Jim Buyens
Microsoft MVP
http://www.interlacken.com
Author of:
*----------------------------------------------------
|\---------------------------------------------------
|| Microsoft Office FrontPage 2003 Inside Out
|| Microsoft Windows SharePoint Services Inside Out
||---------------------------------------------------
|| Web Database Development Step by Step .NET Edition
|| Microsoft FrontPage Version 2002 Inside Out
|| Faster Smarter Beginning Programming
|| (All from Microsoft Press)
|/---------------------------------------------------
*----------------------------------------------------
 

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

Top