|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
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
|
|||
|
|||
|
When my page loads I get this error
Line 202 Char 1 Error 'document.getElementById(....)" is null or not an object Code 0 URL http//tellashopper.com/index.php?option=com_frontpage&itemid=1 I need some assistance on correcting this error.. ![]() |
|
#2
|
||||
|
||||
|
error message
Without seeing more than just the error message I can't say exactly what is causing the error, but.
Is there a typo? Does an element with whatever string is in the parentheses exist at the time the script runs? |
|
#3
|
|||
|
|||
|
I can send you a copy of the source code..would that help?
Quote:
send you a copy of the source code..would that help? |
|
#4
|
||||
|
||||
|
please either attach a copy by converting it to .txt or reqeust my email address by PM and i will try to help you.
i have a couple questions that i need to ask to help... 1) What browser are you trying to set this up to work with? 2) Did you want this to be able to be used in All Browsers possible? 3) What are you trying to accomplish? colton22 Last edited by colton22 : October 17th, 2006 at 02:33 PM. Reason: spelling check |
|
#5
|
||||
|
||||
|
null or not an object
Some browsers are case sensitive
document.getElementById('advert'); will not get <div id="Advert"> Also, if the script runs as the page loads, the element may not have been loaded into the DOM yet so the script can't get it. This can be solved by putting the script in a function and running it "onload" after the DOM has finished loading. |
|
#6
|
||||
|
||||
|
This error can be generated if you are trying to pass the getElementById() method to a variable that hasn't been defined also.
|
![]() |
| Viewing: Dev Articles Community Forums > Programming > JavaScript Development > Error--Help |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|