473,382 Members | 1,290 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.

Image gallery works great in IE but not Firefox

This page http://www.dabhand.co.nz/ayupdev/gallery-riders.html works great in IE but not in Firefox... any help would be appreciated. It refers to an external javascript file which I have included the code to below:

The file name is imgriders.js - as referred to in source of the html file above.

Expand|Select|Wrap|Line Numbers
  1. if (document.images) {
  2. image1 = new Image;
  3. image2 = new Image;
  4. image3 = new Image;
  5. image4 = new Image;
  6. image5 = new Image;
  7. image1.src = 'images\\gallery\/riders1.jpg';
  8. image2.src = 'images\\gallery\/riders2.jpg';
  9. image3.src = 'images\\gallery\/riders3.jpg';
  10. image4.src = 'images\\gallery\/riders4.jpg';
  11. image5.src = 'images\\gallery\/riders5.jpg';
  12. } else {
  13. image1 = '';
  14. image2 = '';
  15. image3 = '';
  16. image4 = '';
  17. image5 = '';
  18. document.rollimg = '';
  19. }
Sep 3 '07 #1
5 2087
5,821 Expert 4TB
Heya, dabhand. Welcome to TSDN!

Changed thread title to better describe the problem (did you know that threads whose titles do not follow the Posting Guidelines actually get FEWER responses?).

Please use CODE tags when posting source code. See the REPLY GUIDELINES on the right side of the page next time you post.

What do you want your code to do? Give an example.
What is your code doing that you don't want it to do? Give an example.
What is your code *not* doing that it is supposed to? Give an example.
Sep 3 '07 #2
210 100+
image1.src = 'images\\gallery\/riders1.jpg';
image2.src = 'images\\gallery\/riders2.jpg';
image3.src = 'images\\gallery\/riders3.jpg';
image4.src = 'images\\gallery\/riders4.jpg';
image5.src = 'images\\gallery\/riders5.jpg';
Why are you using a combination of slashes and backslashes? On web pages always use forward slashes as directory separators, and there's no need to escape them in string literals.
Expand|Select|Wrap|Line Numbers
  1. image1.src = 'images/gallery/riders1.jpg';
Sep 3 '07 #3
7,435 Expert 4TB
Aren't your 'escapes' wrong for the images?
Sep 3 '07 #4
Yahoo... thanks everyone I've got it working now. :-)) dabhand
Sep 4 '07 #5
5,821 Expert 4TB
Heya, dabhand.

Glad to hear you got it working! Good luck with your project, and if you ever need anything, post back anytime :)
Sep 4 '07 #6

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

Similar topics

by: Eric Lindsay | last post by:
I've seen a page using display, and especially display table that did some neat things with boxes, but basically it only worked with Mozilla browsers. Fell over fairly badly with Opera and Safari...
by: Rudy | last post by:
Hello all! I been trying to get a handle with Images. I have learned alot from the fine people here. So, I also learned that thumbnail images look terrible taken from a digital cam. I know why...
by: kaizer bo | last post by:
Hi all, could someone show me how to add javascript functionality to a css image gallery? I would like to adapt the gallery at "http://www.cssplay.co.uk/menu/gallery_click.html" so that when a...
by: RE Kochanski | last post by:
I have attempted to use the CSS techniques from two or three sites to create a CSS only image gallery. I am muddling the affair by placing the thumbnails in one float, the page text in another...
by: jackiepatti | last post by:
QUESTION: I have a web page containing a form that contains an image instead of a submit button, e.g. <form name='myform' action='get' method='otherpage.asp'> <input type='image'...
by: agatha.life | last post by:
I did a javascript for the loading of images (I didn't want to have the images loaded in "on loading" because they are too many). The website is for a model and if you look at the codeof pages (...
by: cjparis | last post by:
Hello everyone. If anyone can give me a hand I would be gratefull Am doing a site which requires a moving element and have used DHTML to do it. Have a simple Browser detect script to sort IE...
by: Gilles Ganault | last post by:
Hello I've been googling for a couple of hours, but still haven't found what I need: - really simple PHP-based image gallery software. Ideally, just a single file that I just drop into a...
by: ishkur88 | last post by:
Hello, I'm a starting out web designer, and a client of mine wants a gallery of their products to be displayed. What I have so far works beautifully. Basically what it does is reads the...
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: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
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: 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:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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.