[Javascript] FW: whats wrong
Iztok Polanic
iztok.polanic at amis.net
Sun Jul 25 03:57:52 CDT 2004
Hi!
But that's not really what I want. Here's the situation. There an image,
placed like an layer. Below it there some tekst with links. When the user
goes over that image, image dissapears and the text is displayed. When user
goes to another image, image reappiers.
Bye,
Iztok
-----Original Message-----
From: javascript-bounces at LaTech.edu [mailto:javascript-bounces at LaTech.edu]
On Behalf Of Tim Makins
Sent: 25. julij 2004 8:19
To: [JavaScript List]
Subject: Re: [Javascript] FW: whats wrong
----- Original Message -----
From: "Iztok Polanic" <iztok.polanic at amis.net>
To: "'[JavaScript List]'" <javascript at LaTech.edu>
Sent: Saturday, July 24, 2004 6:59 PM
Subject: RE: [Javascript] FW: whats wrong
> Hi!
>
> What are the standard mouverover techniques? :)
Something like this, from 'Using JavaScript', by Paul McFedries:
<html>
<head>
<title>Listing 24.9. Preloading Mouseover Images</title>
<script language="JavaScript" type="text/javascript">
<!--
var home_image_over = new Image(200, 35)
home_image_over.src = "home_over.gif"
var home_image_out = new Image(200, 35)
home_image_out.src = "home_out.gif"
var sitemap_image_over = new Image(200, 35)
sitemap_image_over.src = "sitemap_over.gif"
var sitemap_image_out = new Image(200, 35)
sitemap_image_out.src = "sitemap_out.gif"
var support_image_over = new Image(200, 35)
support_image_over.src = "support_over.gif"
var support_image_out = new Image(200, 35)
support_image_out.src = "support_out.gif"
var contact_image_over = new Image(200, 35)
contact_image_over.src = "contact_over.gif"
var contact_image_out = new Image(200, 35)
contact_image_out.src = "contact_out.gif"
function mouseover_handler(image_name) {
// Get the variable name for the preloaded mouseover image
mouseover_image = eval(image_name + "_over")
// Switch to the mouseover image
document.images[image_name].src = mouseover_image.src
}
function mouseout_handler(image_name) {
// Get the variable name for the preloaded mouseout image
mouseout_image = eval(image_name + "_out")
// Switch to the mouseout image
document.images[image_name].src = mouseout_image.src
}
//-->
</script>
</head>
<body>
<a href="javascript:void(0)"
onMouseOver="mouseover_handler('home_image')"
onMouseOut="mouseout_handler('home_image')">
<img src="home_out.gif" name="home_image" border="0"></a>
<br>
<a href="javascript:void(0)"
onMouseOver="mouseover_handler('sitemap_image')"
onMouseOut="mouseout_handler('sitemap_image')">
<img src="sitemap_out.gif" name="sitemap_image" border="0"></a>
<br>
<a href="javascript:void(0)"
onMouseOver="mouseover_handler('support_image')"
onMouseOut="mouseout_handler('support_image')">
<img src="support_out.gif" name="support_image" border="0"></a>
<br>
<a href="javascript:void(0)"
onMouseOver="mouseover_handler('contact_image')"
onMouseOut="mouseout_handler('contact_image')">
<img src="contact_out.gif" name="contact_image" border="0"></a>
</body>
</html>
_______________________________________________
Javascript mailing list
Javascript at LaTech.edu
https://lists.LaTech.edu/mailman/listinfo/javascript
More information about the Javascript
mailing list