Top Mud Sites Forum

Top Mud Sites Forum (http://www.topmudsites.com/forums/index.php)
-   MUD and RPG Webmasters (http://www.topmudsites.com/forums/forumdisplay.php?f=13)
-   -   Mouse Overs (http://www.topmudsites.com/forums/showthread.php?t=845)

Enzo 04-20-2002 09:22 PM

Could someone help me figure out how to do mouse overs?

Noximist 04-20-2002 09:54 PM


Astin 04-20-2002 10:15 PM


Neranz Laverani 04-20-2002 10:45 PM

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


All times are GMT -4. The time now is 04:47 AM.

Powered by vBulletin® Version 3.6.7
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright Top Mud Sites.com 2022