Web Hosting Talk







View Full Version : OnClick event question for IE and Mozilla


Qacer
08-15-2004, 01:46 PM
Hello all,

I am helping my friend with her website: Eternal Family Project (http://www.eternalfamilyproject.org)

I just noticed with Mozilla that one of the onClick Javascript events that I implemented does not work. Take this example: click on the A+ writing on the yellow paper. The heart shaped post-it note should change to say "Education". However, if you click on the A+ writing the "News Update" image written on the yellow paper should change to "Education."

I use the following onClick event in the <A> tag: onClick="document.getElementById('corkboard20').src='corkboard_8x1-education.gif'"

corkboard20 is the name of the image that is being replaced. This works with IE 6.

Any tips?

jamesyfx
08-15-2004, 02:04 PM
It works in an onMouseover sense, in Mozilla for me. :P

Qacer
08-15-2004, 03:00 PM
Hello jamesyfx,

I actually have the onMouseover working in Mozilla, too. I have two On events implemented. The onMousover is supposed to change the image on the heart-shaped post-it note on the upper right. This part works. I can't get the onClick thing to work. Hmm..

e-zone
08-15-2004, 03:04 PM
you can try "onmousedown"

robgct
08-15-2004, 04:28 PM
Little off topic.. but I love the site layout, I haven't seen any that look like that yet :) very nice.

stripeyteapot
08-15-2004, 04:42 PM
Have your turned Javascript on in your Mozilla browser? :eek:

Qacer
08-15-2004, 05:05 PM
Originally posted by xcage
Little off topic.. but I love the site layout, I haven't seen any that look like that yet :) very nice.

Thanks for the comments, xcage! :) It wasn't my idea originally. My friend just proposed it, and I tried my best to implement.

By the way, another Webhostingtalk user provided us with the free webspace. Boon from 8 to Infinity (www.8.to) was kind enough to help us.

Qacer
08-15-2004, 05:08 PM
Originally posted by pmoduk2
Have your turned Javascript on in your Mozilla browser? :eek:

Yep. Javscript is on because the onMouseover event works. I will try using onMousedown like e-zone suggested.