Blonde Guy

JavaScript

My buttons are animated using Javascript. Javascript is quite efficient because it is part of the text of the web page.

Click the big blue button for O'Reilly's JavaScript page JavaScript The Definitive Guide
O'Reilly's terrific book is an indispensible resource for JavaScript.

Code to set up the big blue push button

   <script type="text/javascript">
    <!--
      // animated push-button
      if (document.images) {
         bgDown = new Image();
         bgDown.src = "bgButtonDown.gif";
         bgUp = new Image();
         bgUp.src = "bgButtonUp.gif";
      }

      // button pressed
      function bgShowDown(imgName) {
         if (document.images) {
            document[imgName].src = bgDown.src;
         }
      }

      // button released
      function bgShowUp(imgName) {
         if (document.images) {
            document[imgName].src = bgUp.src;
         }
      }
   // -->
   </script>

Code to use a big blue button

<table cellspacing=0 cellpadding=0 border=0><tr valign=top><td>
<a href="http://www.oreilly.com/catalog/jscript3/" 
   onMouseDown="bgShowDown('javascript')"
   onMouseUp="bgShowUp('javascript')"
   onMouseOut="bgShowUp('javascript')">
   <img name="javascript" SRC="bgButtonUp.gif" 
   alt="Blonde Guy's home page" 
   BORDER=0 height=38 width=36 vspace=10 hspace=10></a>
</td><td>
<a href="http://www.oreilly.com/catalog/jscript3/">Javascript</a> The Definitive Guide
<br>O'Reilly's terrific book is an indispensible resource for JavaScript.
</td></tr></table>
Last Modified: 23 Jan 2005
Graphics by Colorful Language
Copyright 2005 by Blonde Guy