SunQuest
 
           JavaScript Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsProgrammingJavaScript Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
SlickEdit: Code in over 40 languages across 7 platforms. SlickEdit’s unmatched power, speed, and flexibility allows even the most accomplished developers to write better code faster. Download a free trial today!
  #1  
Old October 20th, 2005, 05:04 PM
jackie26 jackie26 is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Oct 2005
Posts: 5 jackie26 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 18 m 19 sec
Reputation Power: 0
Error: 'as' is null or not an object

I keep getting this error from my menu bar once I added hyperlinks to it and
started selecting topics from the drop-down menu.

Line:54
Char: 17
Error: 'as' is null or not an object
Code: 0

I have 2 javascript pages and a style sheet page that the menu references...
I'm not sure which page the error is coming from or why. The pages came from
this example menu bar site.
http://simplythebest.net/scripts/DHTML_scripts/dhtml_script_105.html

This is what is on line 54 on the 'MenubarAPI4.js' file

function itemOver(e){if(this.om.as){rsm(this.om.as);this.om .as=null;}}


I figure this is where the error is.

and by the way... if I click ok on the error window my page still will display.




Any ideas?

Thanks,

Lauren

Reply With Quote
  #2  
Old October 20th, 2005, 06:25 PM
Mittineague's Avatar
Mittineague Mittineague is offline
Contributing User
Dev Articles Novice (500 - 999 posts)
 
Join Date: Jul 2005
Location: West Springfield, Massachusetts
Posts: 541 Mittineague User rank is Private First Class (20 - 50 Reputation Level)Mittineague User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 1 Week 1 Day 2 h 15 m 6 sec
Reputation Power: 3
space

Hi jackie26, welcome to the forums,
Somehow a space got into the variable this.om.as

function itemOver(e){if(this.om.as){rsm(this.om.as);this.om .as=null;}}

so javascipt thinks you have a variable .as, with the value "null". Take out the space and it should work OK
Comments on this post
MichaelSoft agrees: right on!

Reply With Quote
  #3  
Old October 21st, 2005, 07:53 AM
MadCowDzz's Avatar
MadCowDzz MadCowDzz is offline
I'm Internet Famous
Dev Articles Frequenter (2500 - 2999 posts)
 
Join Date: Jan 2003
Location: Toronto, Canada
Posts: 2,890 MadCowDzz User rank is Lance Corporal (50 - 100 Reputation Level)MadCowDzz User rank is Lance Corporal (50 - 100 Reputation Level)MadCowDzz User rank is Lance Corporal (50 - 100 Reputation Level) 
Time spent in forums: 1 Week 16 h 4 m 48 sec
Reputation Power: 8
I've seen the forums add random spaces to Javascript code examples...

jackie26, was that space in your code, or did it magically appear in this forum after posting your question?

Reply With Quote
  #4  
Old October 21st, 2005, 09:13 AM
jackie26 jackie26 is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Oct 2005
Posts: 5 jackie26 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 18 m 19 sec
Reputation Power: 0
There isn't a space there in my code, I'm not sure why it pasted like that in the forum. Can you think of any other reason why this error is accurring?

Thanks.


Quote:
Originally Posted by Mittineague
Hi jackie26, welcome to the forums,
Somehow a space got into the variable this.om.as

function itemOver(e){if(this.om.as){rsm(this.om.as);this.om .as=null;}}

so javascipt thinks you have a variable .as, with the value "null". Take out the space and it should work OK

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingJavaScript Development > Error: 'as' is null or not an object


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway