473,398 Members | 2,120 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,398 software developers and data experts.

IE not supporting image swap.

Markus
6,050 Expert 4TB
My javascript is a little sketchy, so forgive me*.

What I'm doing is pre-loading 2 images with javascript, and then when one image is mouseover'd, that image's src attribute is swapped with the second images.

You can see it here: Untitled Document

Works fine in most browsers, but I was stupid enough to assume IE would act the same.

* Yeah, I hate those 'pitty me' intros too.
Jan 22 '09 #1
5 1117
Dormilich
8,658 Expert Mod 8TB
that's because addEventListener() is not supported by IE. two possibilities, apply attachEvent() for IE or google for the cross browser function addEvent() (there are different available, choose the one you like)
Jan 22 '09 #2
Markus
6,050 Expert 4TB
@Dormilich
Ah, that's good to know. Cheers, Dorm.
Jan 22 '09 #3
Dormilich
8,658 Expert Mod 8TB
I wish more people would use Event Listeners. I'm truly relieved I found one in you, although you could have made the onload event this way too.
Jan 22 '09 #4
Markus
6,050 Expert 4TB
@Dormilich
Well, to be honest, I only knew of them because of yourself. :P So you can pat yourself on the back.
Jan 23 '09 #5
Dormilich
8,658 Expert Mod 8TB
@Markus
done...................
Jan 23 '09 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: Paul Miller | last post by:
Some background first - we have some software that embeds a Python interpreter into a host application. Scripts are loaded dynamically and used. But we want to support the ability to edit scripts...
1
by: John | last post by:
I am rotating images of different dimensions. My problem is that when a new image is displayed in a new position which had an image of a different dimension, the old image is first stretched to the...
2
by: Matthew | last post by:
Hi all I'm looking for a solution that can be used in a calendar/gig guide scenario where each day is represented by a dot image. Now this dot must do the following 1. When the mouse goes...
12
by: Charlie King | last post by:
As I understand it, the use of FIR* to replace heading tags with images in visually enabled CSS browsers is now frowned upon on the basis that some screen readers will *nor* read back text that is...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.