Animating Buttons with JavaScript : Button : Form Control JAVASCRIPT DHTML TUTORIALS


JAVASCRIPT DHTML TUTORIALS » Form Control » Button »

 

Animating Buttons with JavaScript



<html>
<head>

  <title>JavaScript Unleashed</title>
  <script type="text/javascript" language="JavaScript1.1">
  <!--
   
    // Define image objects
    var prevBtnOff = new Image(4252);
    prevBtnOff.src = "http://www.navioo.com/style/logo.png";
   
    var prevBtnOn =  new Image(4252);
    prevBtnOn.src = "http://www.navioo.com/style/logoRed.png";
   
    var nextBtnOff = new Image(4252);
    nextBtnOff.src = "http://www.navioo.com/style/logo.png";
   
    var nextBtnOn =  new Image(4252);
    nextBtnOn.src = "http://www.navioo.com/style/logoRed.png";
   

    // Changes image being displayed.
    function highlightButton(placeholder, imageObject) {
      document.images[placeholder].src = eval(imageObject + ".src")
    }
   
  //-->
  </script>
</head>
<body background="./aiback.gif">
  <center>
    <a href="javascript:history.back()"
       onmouseover="highlightButton('Prev','prevBtnOn');
                    window.status='Previous';
                    return true;"
       onmouseout="highlightButton('Prev','prevBtnOff');
                   window.status='';
                   return true;">
      <img src="./prev_off.gif" border="0" width="52" height="42" name="Prev">
    </a>
    <a href="javascript:history.forward()"
       onmouseover="highlightButton('Next','nextBtnOn');
                    window.status='Next';
                    return true;"
       onmouseout="highlightButton('Next','nextBtnOff');
                    window.status='';
                    return true;">
      <img src="./next_off.gif" border="0" width="52" height="42" name="Next">
    </a>

  </center>
</body>
</html>

           
       



-

Leave a Comment / Note


 
Verification is used to prevent unwanted posts (spam). .

Follow Navioo On Twitter

JAVASCRIPT DHTML TUTORIALS

 Navioo Form Control
» Button