FORUMS: list search recent posts

Preload iWeb snippets?

COW Forums : Apple OS X

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
Thomas Morter-Laing
Preload iWeb snippets?
on Jul 17, 2010 at 10:45:08 pm

Hi there, bit of a random one, and a little bit specialist, but I have a HTML snippet which is a rollover in iWeb, but obviously it doesnt load either of the two rollover images until the first time they are 'touched' my the mouse. After that it's fine, but I can't figure this one out? The code for the rollover I'm using so far is:

function mouseOver()
document.rollover_one.src ="ORIGINAL IMAGE"


function mouseOut()
document.rollover_one.src ="ROLLOVER IMAGE"


Apparently this code is for preloading javascript:

<!-- hide from non JavaScript Browsers

Image1= new Image(150,20)
Image1.src = "pic1.gif"

Image2 = new Image(10,30)
Image2.src = "pic2.gif"

Image3 = new Image(72,125)
Image3.src = "pic3.gif"

// End Hiding -->

But if it DOES work in iWeb 'HTML' snippets with rollovers, i still have no idea how to 'merge' the code :S

How would I incorporate further javascript code into that to 'preload' stuff so that the rollover images dont have to be cached first?


Tom Morter-Laing
Certified Apple Product Proffessional, 2010
Production Assistant, Grace Productions
Degree; TV Production

Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2020 All Rights Reserved