Hello,
Way back in 2000 Ken Cox put up this code for swapping images on a
button.
I cannot work out how to use it so that more than 1 button can use it.
I guess the problem is knowing how to deal with the intImage value?
Cheers
Geoff
<HTML>
<HEAD>
<SCRIPT LANGUAGE=JavaSc ript>
intImage = 2;
function swapImage() {
switch (intImage) {
case 1:
IMG1.src =
"http://www.microsoft.c om/library/toolbar/images/mslogo.gif"
intImage = 2
return(false);
case 2:
IMG1.src =
"http://msdn.microsoft. com/msdn-online/start/images/msdn-logo.gif"
intImage = 1
return(false);
}
}
</SCRIPT>
</HEAD>
<BODY>
<IMG id="IMG1" name="IMG1"
src="http://www.microsoft.c om/library/toolbar/images/mslogo.gif"
onclick="swapIm age();">
</BODY>
</HTML>
Way back in 2000 Ken Cox put up this code for swapping images on a
button.
I cannot work out how to use it so that more than 1 button can use it.
I guess the problem is knowing how to deal with the intImage value?
Cheers
Geoff
<HTML>
<HEAD>
<SCRIPT LANGUAGE=JavaSc ript>
intImage = 2;
function swapImage() {
switch (intImage) {
case 1:
IMG1.src =
"http://www.microsoft.c om/library/toolbar/images/mslogo.gif"
intImage = 2
return(false);
case 2:
IMG1.src =
"http://msdn.microsoft. com/msdn-online/start/images/msdn-logo.gif"
intImage = 1
return(false);
}
}
</SCRIPT>
</HEAD>
<BODY>
<IMG id="IMG1" name="IMG1"
src="http://www.microsoft.c om/library/toolbar/images/mslogo.gif"
onclick="swapIm age();">
</BODY>
</HTML>
Comment