Topic: javascript hover problems (Page 1 of 1) Pages that link to <a href="https://ozoneasylum.com/backlink?for=30747" title="Pages that link to Topic: javascript hover problems (Page 1 of 1)" rel="nofollow" >Topic: javascript hover problems <span class="small">(Page 1 of 1)</span>\

 
toxd
Neurotic (0) Inmate
Newly admitted

From:
Insane since: Jan 2009

posted posted 01-07-2009 06:44

I am doing a presentation for my class and I want to make the images (in the top frame) change when you hover your mouse over it.

www.geocities.com/toddsdruguseproject

I can't figure out why this won't work.

Any help would be greatly appreciated.

-T

Blaise
Paranoid (IV) Inmate

From: London
Insane since: Jun 2003

posted posted 01-07-2009 15:35

Hi toxd, welcome to the Asylum.

You'll be pleased to know that we have a FAQ dedicated to dynamic images and JavaScript

How do I dynamically swap images?

There are lots of previous threads posted here that will answer your question.

Once you've experimented with a solution, feel free to ask for some more help.

Cheers,

toxd
Obsessive-Compulsive (I) Inmate

From:
Insane since: Jan 2009

posted posted 01-08-2009 05:14

Thanks for the reply Blaise.

So I used Doc's formula, and I was able to get at least one button to hover; however, when I added a few more icons, the smiley face only appears on the last box... and it also doesn't go away.

Any ideas on how I can fix this problem?

-T

Tyberius Prime
Maniac (V) Mad Scientist with Finglongers

From: Germany
Insane since: Sep 2001

posted posted 01-08-2009 10:24

you'll need to change the swap(0,1) and swap(0,0) calls on the other buttons.

Seriously, frames are so 1997, if this wasn't just a school project (and I presume you're just starting out),
you'd get some ridicule.
So all you get is the stern advice to read up on css based web design of the new millenium

so long,

->Tyberius Prime

poi
Paranoid (IV) Inmate

From: Norway
Insane since: Jun 2002

posted posted 01-08-2009 11:09
quote:
Seriously, frames are so 1997, if this wasn't just a school project (and I presume you're just starting out),
you'd get some ridicule.

Not to mention geocities.

Using JavaScript, let alone without preloading the images, for such rollover makes no sense. The way to go is CSS only rollover without preload.

toxd
Obsessive-Compulsive (I) Inmate

From:
Insane since: Jan 2009

posted posted 01-08-2009 17:01

Oh yeah. I'm brand new at this. Not to mention pressed for time.

I tried changing the swap numbers but it is still not working. I also tried fiddling with the name tags, adding "name" to the <A HREF tag, but that still didn't work.

So if the name tags and swap tags aren't the problem... what else could it be?

Any help is greatly appreciated!

-T

poi
Paranoid (IV) Inmate

From: Norway
Insane since: Jun 2002

posted posted 01-08-2009 17:38

Have you tried reading the documentation on the things you're using ?

document.images is an Array not a dictionnary.

coach
Nervous Wreck (II) Inmate

From:
Insane since: May 2011

posted posted 05-31-2011 11:10
Edit TP: spam removed


Post Reply
 
Your User Name:
Your Password:
Login Options:
 
Your Text:
Loading...
Options:


« BackwardsOnwards »

Show Forum Drop Down Menu