Click to See Complete Forum and Search --> : rollover images load first


obby
09-03-2003, 11:16 AM
Hello. I don't know any javascript at all.
I'm trying to get there by reading books.
I made button links to each of 15 pages.
They have roll overs so they'll change on hover.
I found out how to preload the roll overs, but now
they arrive before the ordinary images.
I think I should be preloading the ordinary images as well, but I'm not sure how to do it.
It would also be nice if I could put some text behind the images so the user wouldn't be looking at a blank page.
The troublesome page is at http://fay.iniminimo.com/paint-map.html

Khalid Ali
09-03-2003, 11:19 AM
every image is preloaded using this syntaxc

var image= new Image();
image.src = "imagePath.gif";

obby
09-03-2003, 11:25 AM
Thank you very much.

obby
09-03-2003, 11:56 AM
I'm sorry. I still can't understand.
In each pair, both of my images have the same name,
so would I write that same name twice as it is in
the html?
This is what I have in the head:

free = new Image();
free.src = "paint_map/free_graph2.gif";

paint = new Image();
paint.src = "paint_map/paint_cell2.gif";

This is what I have in the body:
<a href="free_graphics.html"
onMouseOver="document.free.src='paint_map/free_graph2.gif';"
onMouseOut="document.free.src='paint_map/free_graph1.gif';">
<img src="paint_map/free_graph1.gif" width="249" height="101" border="0" name="free" alt="Links to Free Graphics Programs"></a>

<a href="paint.html"
onMouseOver="document.paint.src='paint_map/paint_cell2.gif';"
onMouseOut="document.paint.src='paint_map/paint_cell.gif';">
<img src="paint_map/paint_cell.gif" width="249" height="101" border="0" name="paint" alt="Learn Tools and Techniques in Windows Paint"></a>

Khalid Ali
09-03-2003, 12:05 PM
post a link to the page in question

obby
09-03-2003, 12:12 PM
http://fay.iniminimo.com/paint_map.html

Khalid Ali
09-03-2003, 12:27 PM
doesn't look anything wrong to me there...:-)
Seems like all images are being preloaded.

what is it I am looking for ?

obby
09-03-2003, 12:38 PM
When I look at it locally, the pictures with green pretend links come up first. When I look at it on the web, the ones with red pretend links--which are only meant to appear on hover--come up first, and in the last line the red ones blinked out, leaving the background showing.

It's meant to be all green "links" with red coming up only when the mouse passes over.

Khalid Ali
09-03-2003, 12:42 PM
I am lost...when I open your page I see only the green links images andon mouseover the inks turn red,all of them...

obby
09-03-2003, 12:50 PM
Perhaps my connection is slow tonight. They were loading very slowly and in the wrong order. Thank you for all of your time and trouble.:)

Khalid Ali
09-03-2003, 12:53 PM
glad to be of any help(if I actually did help??:D )

obby
09-03-2003, 05:45 PM
Yes, Khalid, you helped.
You looked from a different computer
and told me it was working properly.
That's like having the doctor assure
you you're not coming down with some sickness.
Sorry I didn't answer straight away.
It was 3 or 4 in the morning and I'd gone off to bed.
I couldn't have while I was trying to fix my
problem—even though it didn't really exist.

Happy days!