Hello EB
I got this
<script type="text/javascript" language="JavaScript">
if (document.images) {
var su = new Image(); // for the inactive image
su.src = "photo1.jpg";
var gius = new Image(); // for the active image
gius.src = "photo.jpg";
}
function act() {
if (document.images)
document.images.giu.src = gius.src;
}
function inact() {
if (document.images)
document.images.giu.src = su.src;
}
</script>
.....<HTML>
<div class="box"> <a href="#" onClick="act()" onClick="inact();">
<img src="photo1.jpg" name="giu" border="0" alt="Netscent Advantages"></a></div>
The first function works, and show the image I want. (photo.jpg) when i clikc the mouse.
But if i want to return to the previous image, clicking again, It does not works
is there a part. reason? it seems correct?
bye
I got this
<script type="text/javascript" language="JavaScript">
if (document.images) {
var su = new Image(); // for the inactive image
su.src = "photo1.jpg";
var gius = new Image(); // for the active image
gius.src = "photo.jpg";
}
function act() {
if (document.images)
document.images.giu.src = gius.src;
}
function inact() {
if (document.images)
document.images.giu.src = su.src;
}
</script>
.....<HTML>
<div class="box"> <a href="#" onClick="act()" onClick="inact();">
<img src="photo1.jpg" name="giu" border="0" alt="Netscent Advantages"></a></div>
The first function works, and show the image I want. (photo.jpg) when i clikc the mouse.
But if i want to return to the previous image, clicking again, It does not works
is there a part. reason? it seems correct?
bye