By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,694 Members | 1,882 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,694 IT Pros & Developers. It's quick & easy.

Javascript doesn't work in Firefox

P: n/a
Hey
I have a problem with a Javascript, which doesn't works in Firefox
You can have a mouse over the 2 first pictures, but after the second
picture has moved over the screen, nothing is happening when you move
the mouse over the slideshow
The source code is here:
http://the87boy.dk/Slideshow.html

What could be wrong?

May 10 '07 #1
Share this Question
Share on Google+
2 Replies


P: n/a
On May 11, 6:41 am, The87Boy <the87...@gmail.comwrote:
Hey
I have a problem with a Javascript, which doesn't works in Firefox
You can have a mouse over the 2 first pictures, but after the second
picture has moved over the screen, nothing is happening when you move
the mouse over the slideshow
The source code is here:http://the87boy.dk/Slideshow.html

What could be wrong?
A lot. In Firefox I see nothing at all, I didn't bother to check with
IE.

Some tips:

- Don't use browser detection, use feature detection
- Don't use eval - it is a good indication that you don't understand
basic javascript
- Don't use large numbers of global variables, each one you use
increases the chance of a collision with other code

Anyhow, your issue is likely related to your invalid HTML:

<div id='adv' width=&{scrollerwidth}; height=&{scrollerheight};
bgColor=&{scrollerbgcolor}; visibility=hide>
Your doctype claims HTML 4 strict, check with a validator - there are
40 errors, nearly all of them significant:

<URL: http://validator.w3.org/check?uri=ht...Slideshow.html
>

<img src='Pics/Party-Nord.png' width=&{scrollerwidth};
height=&{scrollerheight}; />

Don't use XML markup when your doctype is HTML.
--
Rob

May 10 '07 #2

P: n/a
On 11 Maj, 01:52, RobG <r...@iinet.net.auwrote:
On May 11, 6:41 am, The87Boy <the87...@gmail.comwrote:
Hey
I have a problem with a Javascript, which doesn't works in Firefox
You can have a mouse over the 2 first pictures, but after the second
picture has moved over the screen, nothing is happening when you move
the mouse over the slideshow
The source code is here:http://the87boy.dk/Slideshow.html
What could be wrong?

A lot. In Firefox I see nothing at all, I didn't bother to check with
IE.

Some tips:

- Don't use browser detection, use feature detection
- Don't use eval - it is a good indication that you don't understand
basic javascript
- Don't use large numbers of global variables, each one you use
increases the chance of a collision with other code

Anyhow, your issue is likely related to your invalid HTML:

<div id='adv' width=&{scrollerwidth}; height=&{scrollerheight};
bgColor=&{scrollerbgcolor}; visibility=hide>

Your doctype claims HTML 4 strict, check with a validator - there are
40 errors, nearly all of them significant:

<URL:http://validator.w3.org/check?uri=http%3A%2F%2Fthe87boy.dk%2FSlideshow.htm l>

<img src='Pics/Party-Nord.png' width=&{scrollerwidth};
height=&{scrollerheight}; />

Don't use XML markup when your doctype is HTML.
I know my problem is DOM, because I can see the rendered code, that
the a-tag only goes twice

May 11 '07 #3

This discussion thread is closed

Replies have been disabled for this discussion.