473,379 Members | 1,520 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,379 software developers and data experts.

Image Ready Rollovers

This rollover script is created by Image Reaady. When using IE and
especially with Win XP the images involved in the rollover disappear.
It happens gradually with one or two at first then all. Even a browser
refresh does not bring the images back.

I there a problem known issue with Image Ready rollover scripts and IE+XP?

<script TYPE="text/javascript">
<!--
function newImage(arg) {
if (document.images) {
rslt = new Image();
rslt.src = arg;
return rslt;
}
}

function changeImages() {
if (document.images && (preloadFlag == true)) {
for (var i=0; i<changeImages.arguments.length; i+=2) {
document[changeImages.arguments[i]].src = changeImages.arguments[i+1];
}
}
}

var preloadFlag = false;
function preloadImages() {
if (document.images) {
login_over = newImage("images/login-over.jpg");
join_over = newImage("images/join-over.jpg");

Snip out several image preloads

preloadFlag = true;
}
}

// -->
</SCRIPT>

Jul 20 '05 #1
3 5054
Magic-chef wrote on 28 jun 2003 in comp.lang.javascript:
I there a problem known issue with Image Ready rollover scripts and
IE+XP?


No, not to me.

Why not keep it simple:

<img src="img1.jpg"
onmouseover="this.save=this.src;this.src='img1a.jp g'"
onmouseout="this.src=this.save">
<img src="img1a.jpg" width=0 alt="preloader">
<br>
<img src="img2.jpg"
onmouseover="this.save=this.src;this.src='img2a.jp g'"
onmouseout="this.src=this.save">
<img src="img2a.jpg" width=0 alt="preloader">

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Jul 20 '05 #2
Evertjan. wrote:
Magic-chef wrote on 28 jun 2003 in comp.lang.javascript:
I there a problem known issue with Image Ready rollover scripts and
IE+XP?

No, not to me.

Why not keep it simple:

<img src="img1.jpg"
onmouseover="this.save=this.src;this.src='img1a.jp g'"
onmouseout="this.src=this.save">
<img src="img1a.jpg" width=0 alt="preloader">
<br>
<img src="img2.jpg"
onmouseover="this.save=this.src;this.src='img2a.jp g'"
onmouseout="this.src=this.save">
<img src="img2a.jpg" width=0 alt="preloader">


So, I would use the preload function just as it is and scrap the
newimage function. The new image is replaced by onmouse*= in the image
tags.

Please excuse me as I am just starting to learn Javascript.

Jul 20 '05 #3
Evertjan. wrote:[color=blue]
> Magic-chef wrote on 28 jun 2003 in comp.lang.javascript:
>[color=green]
>>I there a problem known issue with Image Ready rollover scripts and
>>IE+XP?[/color]
>
>
> No, not to me.
>
> Why not keep it simple:
>
> <img src="img1.jpg"
> onmouseover="this.save=this.src;this.src='img1a.jp g'"
> onmouseout="this.src=this.save">
> <img src="img1a.jpg" width=0 alt="preloader">
> <br>
> <img src="img2.jpg"
> onmouseover="this.save=this.src;this.src='img2a.jp g'"
> onmouseout="this.src=this.save">
> <img src="img2a.jpg" width=0 alt="preloader">
>
>
>[/color]

So, I would use the preload function just as it is and scrap the
newimage function. The new image is replaced by onmouse*= in the image
tags.

Please excuse me as I am just starting to learn Javascript.
Great solution, I have a lot of trouble with those darn roll-over scripts!

I have a suggestion though. when I use the width=0 for the "preloader" images, I'm still seeing a tiny box next to the real image. I am using VS .Net and IE6. The images in question are in an anchor tag in my example; this is probably the most common use, ie roll-over links...but I digress.

Instead, I used style="display:none;" in the "preloader" img tag. Bam! No tiny image link!

<a href="#" id="button1" runat="server">
<img name="enterButton_03" src="images/enterButton_03.png" width="91" height="20" border="0" alt="enter" id="IMG1" runat="server"
onmouseover="this.save=this.src;this.src='images/enterButton_03-over.png'"
onmouseout="this.src=this.save">
<img src='images/enterButton_03-over.png' style="display:none;" alt="preloader">
</a>
Apr 21 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

15
by: Applebrown | last post by:
I've got a couple of errors on my site that I'm not sure how to fix. I'm using simple CSS for both text rollovers and my horizontal navbar, and here's what happens. First, the site: ...
2
by: Cynthia | last post by:
I'm looking for javascript code that when I mouse over a menu item will display a picture elsewhere on the page. I know it exists, but the ones I've found so far just swap out the menu item in...
1
by: markus.daab | last post by:
Hi! I need help, I am creating a Virtual Tour through our highschool, and I have an image map and depending on where the cursor goes (blue hallway, gym, etc.) I need a different Picture, plus a...
5
by: jedbob | last post by:
I used Adobe Imageready to build a simple rollover navigation bar, where the text will change color on a mouse over. The working example can be found at:...
4
by: lindsey.crocker | last post by:
I have this links list with background images set on them which changes when they roll over. The <td> is set valign="middle" however as soon as you apply the rollover to the link, the text jumps...
2
by: tripathy.asish | last post by:
Hi, I'm new here and was just hoping that some of you experts could help me! I would like to create a photo page using 'rollovers' however am finding it increasingly hard to find any...
7
by: simchajoy2000 | last post by:
Hi, I am just a javascript beginner so maybe this is a simple problem but I am trying to do some rollovers on images in a separate <div>. Here is the relevent piece of my code: <html>...
2
by: Casimir | last post by:
I am looking into making pure CSS image rollovers. Do you have any clever (and robust) CSS rollover-tricks? Or links to such "in the wild"? I have figured out two methods for this, but have...
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: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
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.