1 Reply Latest reply on May 17, 2010 9:02 AM by Randy Edmunds

    Javascript cursor problem

    JonnyDL-HV74P1

      I have been trying to find a way to conditionally change the Icon via Javascript. I search the net and found the code/syntax, but when I use it, it compiles, but it doesn't work. My logic is obviously flawed. Can anybody see what I'm missing?

       

      What I want it to do:

      mouse over an thumbnail image, if its bigger brother(original/larger image) is visible do not change, otherwise change to a pointer and show the bigger brother. here is code I want the changes to occur in

       

      onMouseover call:

      function showAdSize(otherSize)

      {

      switch(otherSize)

      {

      case "300.0":

      if(width=="300.0")

      {

      document.getElementById("medrecSize").style.visibility = "hidden";

      break;

      }

      ***

      here is where I put the code to change the cursor for the other images to use the pointer

      (if its not 300.0 the change the other two will use the pointer)

      the code I found

      document.getElementById("medrecSize").style.cursor = "pointer";

      ***

      document.getElementById("leaderSize").style.visibility = "hidden";

      document.getElementById("medrecSize").style.visibility = "visible";

      document.getElementById("skySize").style.visibility = "hidden";

      break;

       

      case "728.0":

      if(width=="728.0")

      {

      document.getElementById("leaderSize").style.visibility = "hidden";

      break;

      }

      document.getElementById("leaderSize").style.visibility = "visible";

      document.getElementById("medrecSize").style.visibility = "hidden";

      document.getElementById("skySize").style.visibility = "hidden";

      break;

       

      case "160.0":

      if(width=="160.0")

      {

      document.getElementById("skySize").style.visibility = "hidden";

      break;

      }

      document.getElementById("leaderSize").style.visibility = "hidden";

      document.getElementById("medrecSize").style.visibility = "hidden";

      document.getElementById("skySize").style.visibility = "visible";

      break;

      }

      }

      Hopefully someone can see what I'm missing