473,382 Members | 1,717 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,382 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 1115
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...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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...

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.