RSS Forums RSS
Please support our JavaScript / DHTML / AJAX advertiser: Lunarpages Web Hosting
Views: 1206 | Replies: 3
Reply
Join Date: Apr 2006
Location: Rural New York State
Posts: 2
Reputation: rongladd is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
rongladd rongladd is offline Offline
Newbie Poster

javascript NG on Firefox

  #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
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Dec 2004
Posts: 1,592
Reputation: tgreer is an unknown quantity at this point 
Rep Power: 7
Solved Threads: 35
Colleague
tgreer tgreer is offline Offline
Made Her Cry

Re: javascript NG on Firefox

  #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  
Join Date: Apr 2006
Location: Rural New York State
Posts: 2
Reputation: rongladd is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
rongladd rongladd is offline Offline
Newbie Poster

Re: javascript NG on Firefox

  #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  
Join Date: Dec 2004
Posts: 1,592
Reputation: tgreer is an unknown quantity at this point 
Rep Power: 7
Solved Threads: 35
Colleague
tgreer tgreer is offline Offline
Made Her Cry

Re: javascript NG on Firefox

  #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  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes
Forums | Blogs | Tutorials | Code Snippets | Whitepapers | RSS Feeds | Advertising
All times are GMT -4. The time now is 3:26 am.
Newsletter Archive - Sitemap - Privacy Statement - Acceptable Use Policy - Contact Us
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC