Home     |     .Net Programming    |     cSharp Home    |     Sql Server Home    |     Javascript / Client Side Development     |     Ajax Programming

Ruby on Rails Development     |     Perl Programming     |     C Programming Language     |     C++ Programming     |     IT Jobs

Python Programming Language     |     Laptop Suggestions?    |     TCL Scripting     |     Fortran Programming     |     Scheme Programming Language


 
 
Cervo Technologies
The Right Source to Outsource

MS Dynamics CRM 3.0

Javascript / Client Side Development

Javascript doesn't work in Firefox


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?

On May 11, 6:41 am, The87Boy <the87@gmail.com> wrote:

> 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%2FSlidesho...


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

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

--
Rob

On 11 Maj, 01:52, RobG <r@iinet.net.au> wrote:

I know my problem is DOM, because I can see the rendered code, that
the a-tag only goes twice
Add to del.icio.us | Digg this | Stumble it | Powered by Megasolutions Inc