You are here: irt.org | FAQ | JavaScript | Image | Q1645 [ previous next ]
Try:
<script language="JavaScript"><!-- var onOrOff= 'on'; var rate = 500; // blinks every half second function blinkImage() { if (onOrOff == 'on') onOrOff = 'off'; document.images['myImage'].src = 'myimage' + onOrOff + '.gif'; times--; if (times <= 0) return; setTimeout('blinkImage()',rate); } var times = 3; setTimeout('blinkImage()',rate); //--></script>