• Hey all, due to some issues with false DMCA takedown requests, we've had to remove and censor a few things until the situation is resolved. Sorry for any inconvenience.
  • Be sure to join the discussion on our discord at: Discord.gg/serebii
  • If you're still waiting for the e-mail, be sure to check your junk/spam e-mail folders

changing hover button help

weavile/perap eater

Well-Known Member
i have this problem with my hover button here is the site when you click on the button it shows these messed up words i went trough the code and found nothing wrong.
Someone can you edit this code those weird words wont show
Javascript=
Code:
SCRIPT language="JavaScript">
<!--

  if (document.images)
   {
     pic1on= new Image(150,28);
     pic1on.src="http://img254.imageshack.us/img254/5065/chao1qhbigstnkinpileofcbx8.png";  

     pic1off= new Image(150,28);
     pic1off.src="http://img162.imageshack.us/img162/790/382uu4.png";
   }

function lightup(imgName)
 {
   if (document.images)
    {
      imgOn=eval(imgName + "on.src");
      document[imgName].src= imgOn;
    }
 }

function turnoff(imgName)
 {
   if (document.images)
    {
      imgOff=eval(imgName + "off.src");
      document[imgName].src= imgOff;
    }
 }

//-->
</SCRIPT>

html=
Code:
<IMG SRC="../images/http://img240.imageshack.us/img240/6290/382sg9.png" name="pic1" width="150" height="28" border="0"></A>
 
Not much is wrong.
Following:
Code:
<A HREF = "???"><IMG SRC="http://img240.imageshack.us/img240/6290/382sg9.png" name="pic1" width="150" height="28" border="0"></A>
Reason:
The code .../images/ is a no no. [code] <SCRIPT languag...llow]"[/color]on.src[color=yellow]"[/color]);
 
Last edited:
Code:
<!--You didn't add '<' at the beggining of your script-->
<!--Isn't there supposed to be an event on 'if (document.images)'?-->
<!--What is 'on.src'?-->
<!--What is 'off.src'?-->
<SCRIPT language="JavaScript">
<!--
  if (document.images)
   {
     pic1on = new Image(150,28);
        pic1on.src="http://img254.imageshack.us/img254/5065/chao1qhbigstnkinpileofcbx8.png";  

     pic1off = new Image(150,28);
     pic1off.src = "http://img162.imageshack.us/img162/790/382uu4.png";
   }
function lightup(imgName)
 {
   if (document.images)
    {
      imgOn=eval(imgName + on.src);
      document.imgName.src= imgOn;
    }
 }

function turnoff(imgName)
 {
   if (document.images)
    {
      imgOff=eval(imgName + off.src);
      document.imgName.src= imgOff;
    }
 }

//-->

</SCRIPT>
 
Back
Top