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.

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
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
6,050 Expert 4TB
Ah, that's good to know. Cheers, Dorm.
Jan 22 '09 #3
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
6,050 Expert 4TB
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
8,658 Expert Mod 8TB
Jan 23 '09 #6

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

Similar topics

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...
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...
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...
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...
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...
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,...
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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$) { } ...
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...
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
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...
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...
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.