/    Sign up×
Community /Pin to ProfileBookmark

Help With Error

I have implemented a dropdown menu for this website: therealestategrapevine.com

and I have an error message in the bottom left of my browser that says the error is on line 18, character 13, object required, code 0.

I am at a complete loss with this…c an someone help an amateur like me!?

Thank you,

to post a comment
JavaScript

8 Comments(s)

Copy linkTweet thisAlerts:
@JMRKERApr 09.2008 — Do you have a link to your code to look at?
Copy linkTweet thisAlerts:
@Ryan_WardauthorApr 09.2008 — Here is the script...

[CODE]<script type="text/javascript"><!--//--><![CDATA[//><!--
startList = function() {
if (document.all&&document.getElementById) {
navRoot = document.getElementById("nav");
for (i=0; i<navRoot.childNodes.length; i++) {
node = navRoot.childNodes[i];
if (node.nodeName=="LI") {
node.onmouseover=function() {
this.className+=" over";
}
node.onmouseout=function() {
this.className=this.className.replace(" over", "");
}
}
}
}
}
window.onload=startList;
//--><!]]></script>[/CODE]
Copy linkTweet thisAlerts:
@JMRKERApr 09.2008 — Try this:

window.onload=startList();

since startList appears to be a function.
Copy linkTweet thisAlerts:
@Ryan_WardauthorApr 09.2008 — Thank you very much. That's got it fixed. I appreciate your expertise.
Copy linkTweet thisAlerts:
@JMRKERApr 09.2008 — You're most welcome.

Glad I was able to help.

Good Luck!
Copy linkTweet thisAlerts:
@Ryan_WardauthorApr 10.2008 — O.K. so that problem dissappeared, but, now it has reappeared on a different line...

Line 19

Character 13

Error: Object Required

Code: 0

Here is the code:

&lt;script type="text/javascript"&gt;&lt;!--//--&gt;&lt;![CDATA[//&gt;&lt;!--
startList = function() {
if (document.all&amp;&amp;document.getElementById) {
navRoot = document.getElementById("nav");
for (i=0; i&lt;navRoot.childNodes.length; i++) {
node = navRoot.childNodes[i];
if (node.nodeName=="LI") {
node.onmouseover=function() {
this.className+=" over";
}
node.onmouseout=function() {
this.className=this.className.replace(" over", "");
}
}
}
}
}
window.onload=startList();
//--&gt;&lt;!]]&gt;&lt;/script&gt;


Here is the website: www.therealestategrapevine.com

Any help would be greatly appreciated.

Thank you,
Copy linkTweet thisAlerts:
@kurbyApr 10.2008 — I don't see an element with ID="nav" on your page.
Copy linkTweet thisAlerts:
@Ryan_WardauthorApr 10.2008 — Man...

Sometimes the answer is staring you in the face. It was supposed to be "nav-cats"

Thanks ?
×

Success!

Help @Ryan_Ward spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.25,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...