469,361 Members | 2,276 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,361 developers. It's quick & easy.

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 1898
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

Post your reply

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

Similar topics

14 posts views Thread by Eric Lindsay | last post: by
14 posts views Thread by Rudy | last post: by
2 posts views Thread by kaizer bo | last post: by
4 posts views Thread by RE Kochanski | last post: by
3 posts views Thread by jackiepatti | last post: by
1 post views Thread by agatha.life | last post: by
10 posts views Thread by cjparis | last post: by
25 posts views Thread by Gilles Ganault | last post: by
3 posts views Thread by ishkur88 | last post: by
reply views Thread by zhoujie | last post: by
1 post views Thread by Marylou17 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.