Old 31-05-2009, 23:54   #1 (permalink)
Paulie222
I love Jesus!
 
Paulie222's Avatar
 
Join Date: May 2009
Location: Jacksonville, FL
Posts: 32
Send a message via AIM to Paulie222 Send a message via Skype™ to Paulie222
Image Rollover- ImgOut & ImgOver

Ok this is a pretty easy code to understand but I don't know why when after the ImgOver occurs why the image for ImgOut does not release the rollover. Here is the code I have inserted before the </head> tag:

Code:
<script> if (document.images){ var ImgOver=new Array(); ImgOver[0]=new Image (); ImgOver[0].src = "Images/register2.jpg"; var ImgOut =new Array(); ImgOut[0]=new Image(); ImgOut[0].src = "Images/register.jpg"; } function RollOver(i) { if (document.images) document.images[i].src= ImgOver[i].src; } function RollOut(i) { if (document.images) document.images[i].src= ImgOut[i].src; } </script>

and here is the code that I have in the body of the page:

Code:
<td class="style6" colspan="2"> <a href="createacct.aspx" onmouseover="RollOver(0)" onmouseout= "Rollout(0)"> <asp:Image ID="Image1" runat="server" ImageUrl="~/Images/register.jpg" /> </a> </td>
  Reply With Quote
Old 01-06-2009, 02:04   #2 (permalink)
rustybones
Dinofuzz™
 
rustybones's Avatar
 
Join Date: Oct 2007
Location: Umeċ, Sweden
Posts: 938
Look up CSS Rollovers - much less hassle than this and while you're at it check out CSS sprites too.
__________________
  Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search


Contact Us - Web Design Forums - Archive
Web Hosting by Heart Internet, vBulletin © 2000-2009 Jelsoft Enterprises Limited.
Search Engine Optimization by vBSEO 3.0.0 RC8
Web Hosting by Heart Internet