|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
|
|
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
|
|||
|
|||
|
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 |
|
#2
|
||||
|
||||
|
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 |
|
#3
|
||||
|
||||
|
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? |
|
#4
|
|||
|
|||
|
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:
|
![]() |
| Viewing: Dev Articles Community Forums > Programming > JavaScript Development > Error: 'as' is null or not an object |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|