You are here: irt.org | FAQ | JavaScript | Image | Q1327 [ previous next ]
Try:
<script language="JavaScript"><!-- times = 0; onOrOff= 'on'; 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); } function someFunction() { times = 3; setTimeout('blinkImage()',rate); } //--></script>