Tilted Forum Project Discussion Community  

Go Back   Tilted Forum Project Discussion Community > Interests > Tilted Technology


 
 
LinkBack Thread Tools
Old 04-06-2005, 08:53 AM   #1 (permalink)
Insane
 
Location: not there
mouseover help

I am using a really basic mouseover script to change a linkable image when the mouse runs over it. The script works fine on my local computer but after I upload the page to my host it takes ages for the image to swap to the second image. I have tried using a Javascript but get the same results.
Here is the code that I am using now. I thought it would be best as it was the most basic;
<a href="page1.htm"><img src="graphics/image1.jpg" border="0" onmouseover="src='graphics/image2.jpg'" onmouseout="src='graphics/image1.jpg'"></a>

Is this just a problem with my host or my connection or is there a faster way to do this.
Thanks.
limey is offline  
Old 04-06-2005, 09:43 AM   #2 (permalink)
a-j
Tilted
 
I would guess, the image isn't being loaded until the mouseover event is triggered. There are probably ways to preload the image, but I don't know much about javascript to tell you the answer.
a-j is offline  
Old 04-06-2005, 02:08 PM   #3 (permalink)
paranoid
 
Silvy's Avatar
 
Location: The Netherlands
Try loading the image in javascript, on document load.
put something like this in the head section of your document:

<script type="text/javascript">

preloadImg = new Image()
preloadImg.src = "yourimage.png"
</script>
__________________
"Do not kill. Do not rape. Do not steal. These are principles which every man of every faith can embrace. "
- Murphy MacManus (Boondock Saints)
Silvy is offline  
 

Tags
mouseover


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -8. The time now is 11:54 PM.

Tilted Forum Project

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Search Engine Optimization by vBSEO 3.6.0 PL2
© 2002-2012 Tilted Forum Project

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76