[hunchentoot-devel] blinking hunchentoot logo

Jeff Cunningham jeffrey at cunningham.net
Sun Nov 9 20:40:31 UTC 2008


Patrick May wrote:
>     Here's a quick hack to display a blinking logo.  Put this 
> JavaScript in the head element of your page:
>
> <SCRIPT LANGUAGE="JavaScript">
> <!-- Begin
> var blinkInterval = 5 * 1000;  // five seconds
> var blinkTime = 1 * 1000;      // one second
>
> var logoFile = "hunchentoot-logo.png";
>
> var blinkImageFiles = new Array
> ("hunchentoot-logo-blink-1.png",
>  "hunchentoot-logo-blink-2.png",
>  "hunchentoot-logo-blink-3.png",
>  "hunchentoot-logo-blink-4.png");
> var imageCount = blinkImageFiles.length;
>
> function startBlink()
>   {
>   setInterval("blink()",blinkInterval);
>   }
>
> function blink()
>   {
>   var index = Math.floor(imageCount * Math.random());
>   var imageFile = blinkImageFiles[index];
>   document["HunchentootLogo"].src = imageFile;
>
>   setTimeout("unBlink()",blinkTime);
>   }
>
> function unBlink()
>   {
>   document["HunchentootLogo"].src = logoFile;
>   }
> //  End -->
> </script>
>
> Put a named image tag in the body of your page like this:
>
> <img border="0" src="hunchentoot-logo.png" name="HunchentootLogo"/>
>
>
>     That's it.  I've attached the images hacked from the Hunchentoot 
> logo on the website.  Hopefully they'll get through the mail list 
> software.  Now to modify this to use parenscript....
>
> Regards,
>
> Patrick
>
The images came through just fine. Thanks, Patrick. I'll see if I can 
make it work this afternoon.
(I wonder how long it will take her to notice...?)

Jeff





More information about the Tbnl-devel mailing list