javascript NG on Firefox

Please support our JavaScript / DHTML / AJAX advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
Reply

Join Date: Apr 2006
Posts: 2
Reputation: rongladd is an unknown quantity at this point 
Solved Threads: 0
rongladd rongladd is offline Offline
Newbie Poster

javascript NG on Firefox

 
0
  #1
Apr 20th, 2006
Regarding my website at: http://www.artmakers.com

The below javascript, which rotates a .gif image logo, works fine on my website with Internet Explorer, but when Viewed with Firefox it will not move the image. The error message in the Firefox Javascript Console is:

Error: circleLayer is not defined
Source File: index.html Line: 106

Line 106 is in the context of the whole page. I posted just the javascript at http://www.artmakers.com/error.txt In the javascript , it's the line that says:
circleLayer.moveAngle += 1

Thanks..... Ron
Reply With Quote Quick reply to this message  
Join Date: Dec 2004
Posts: 1,655
Reputation: tgreer is an unknown quantity at this point 
Solved Threads: 35
Team Colleague
tgreer tgreer is offline Offline
Made Her Cry

Re: javascript NG on Firefox

 
0
  #2
Apr 20th, 2006
"circleLayer" is defined inside conditionals, and none of your conditionals test for FireFox.

You only test for Netscape and Internet Explorer, based on deprecated DOM objects (document.layers).

Your page is also missing a DOCTYPE declaration, so no test is really going to be valid, and no code will be dependable.

Start by fixing the DOCTYPE issue, then you may not need to do a browser test.
Reply With Quote Quick reply to this message  
Join Date: Apr 2006
Posts: 2
Reputation: rongladd is an unknown quantity at this point 
Solved Threads: 0
rongladd rongladd is offline Offline
Newbie Poster

Re: javascript NG on Firefox

 
0
  #3
Apr 20th, 2006
Thanks for the info, That's over my head, but I'll try to make sense of it.
Thanks....Ron
Reply With Quote Quick reply to this message  
Join Date: Dec 2004
Posts: 1,655
Reputation: tgreer is an unknown quantity at this point 
Solved Threads: 35
Team Colleague
tgreer tgreer is offline Offline
Made Her Cry

Re: javascript NG on Firefox

 
0
  #4
Apr 20th, 2006
Just start by researching "doctype". Learn what a doctype is, and which one you should use.

After you've got that figured out, adjust your code accordingly. You may find you don't need to test for different browsers at all.

If you do, find a better, more thorough "browser sniffer" script.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the JavaScript / DHTML / AJAX Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC