|
|
#1 |
|
Senior Member
Join Date: Apr 2002
Location: Seattle, Washington
Posts: 342
![]() |
Could someone help me figure out how to do mouse overs?
|
|
|
|
|
|
#2 |
|
New Member
|
I assume you mean mouseovers on links.. if not, discard this.
Things like [code] <a href=http;//go.to.here onMouseOver="window.status='Enter the den of the dragon!'; return true" onMouseOut="window.status=' '; return true">Enter</a>[/quote] allow you to change the status bar, although they can be really irritating if surfers want to know the URL of the page they're going to. You can use the onMouseOver and onMouseOut (pointer over link, and pointer moving away, respectively) to call other things, too, like Javascript subroutines and such. There are other options, too, like onLoad, but I can't tell you much about them because I never use 'em. |
|
|
|
|
|
#4 |
|
Member
Join Date: Apr 2002
Location: The States
Posts: 116
![]() |
Here is an example if you meant changing buttons for when users put their mouse over the button.
The example uses two images: g_homeon.gif and g_homeoff.gif. g_homeoff.gif loads by default on the page and shows whenever the user does not have their browser over the "button." g_homeon.gif shows whenever the user's button is over the image. [code] JavaScript; <script language="JavaScript"> <!-- if (document.images) { mainon = new Image(); mainon.src = "g_homeon.gif"; mainoff = new Image(); mainoff.src = "g_homeoff.gif"; } function imgOn(imgName) { if (document.images) { document[imgName].src = eval(imgName + "on.src"); } } function imgOff(imgName) { if (document.images) { document[imgName].src = eval(imgName + "off.src"); } } // --> </script> HREF; <a href="index.html" onMouseOver="imgOn('main')" onMouseOut="imgOff('main')"><img src="g_homeoff.gif" name="main" alt="Home" border="0" width="128" height="20"></a> [/quote] This is the javascript that I use on The Art of Building. If you want to see what it looks like in a page, click on The Art of Building in my signature and view the source on the first page that loads. Neranz Laverani, Seeker of Knowledge |
|
|
|
![]() |
| Thread Tools | |
|
|