Hi, I am trying to create some animated buttons for a website in javascript. I wrote this code but it gives error:
It says undefined image, and undefined button...
| Code: |
|
<script language="JavaScript" type="text/javascript"> <!-- // { if(document.images) // CREATING PRESS VERSION, ALSO MOUSE OVER goalson = new image(); goalson.src = "images/goals_h.gif"; homeon = new image(); homeon.src = "images/home_h.gif"; abouton = new image(); abouton.src = "images/about_h.gif"; programson = new image(); programson.src = "images/programs_h.gif"; newson = new image(); newson.src = "images/news_h.gif"; // CREATING NORMAL VERSION goals = new image(); goals.src = "images/goals.gif"; homeb = new image(); homeb.src = "images/homeb.gif"; about = new image(); about.src = "images/about.gif"; programs = new image(); programs.src = "images/programs.gif"; news = new image(); news.src = "images/news.gif"; // UP VERSION IS PRESS VERSION } --> </script> |
It says undefined image, and undefined button...
