Simple image swap not working...Why?
Available news archives: comp.lang.tcl - comp.lang.python - comp.security.firewalls - sci.crypt - comp.lang.php - comp.lang.javascript
Google
 
Web news.hping.org


comp.lang.javascript archive

Simple image swap not working...Why?

From: Ed Jay <edMbj@aes-intl.com>
Date: Fri Apr 28 2006 - 19:30:43 CEST

Why doesn't the following swap images?

<head>
<javascript type="text/javascript">
 function swapImage() {document.images.image1.src=/images/1stimage.gif;}
 function swapBack() {document.images.image1.src=/images/2ndimage.gif;}
</script>
</head><body>

<a href=url onMouseOver=swapImage(); onMouseOut=swapBack();>
<img name="image1" src="/images/1stImage.gif"></a>

On page load I see 1stimage. When I mouseover, the image disappears and
leaves a blank in its place. Nothing changes afterwards when I mouseOut or
mouseOver.

-- 
Ed Jay (remove 'M' to respond by email)
Received on Mon May 1 05:25:50 2006