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:
  #1  
Old March 27th, 2007, 12:14 AM
ginaco ginaco is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Mar 2007
Posts: 1 ginaco User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 21 m 15 sec
Reputation Power: 0
Error: 1 is null or not an object

Can anyone help me with this problem?

Everything actually works just fine on this page, but the annoying Error on page comes up with this error:

Error: 'links[..].1" is null or not an object

The code looks like this:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"(URL address blocked: See forum rules)">

<html>

<head>

<link rel="stylesheet" type="text/css" href="ptsa.css" />
<script language=javascript src="lists.js"></script>
<script language=javascript src="mainscripts.js"></script>
<script type="text/javascript" language="JavaScript1.2" src="menu.js"></script>


</head>

<body background="bigbear_t.png">

<body>

<script language=javascript>
var thisaddress = window.location.href;
var thispage = delineate(thisaddress);
writeheader();
writeleftnav(thispage);
writeleftimg();
links.sort(sortbasic);
</script>

<td id=content>

<p class=title><b>Links</b></p>

<ul><script language=javascript>
for (count=0;count<links.length;count++)
{document.write("<li><a href=" + links[count][1] + ">" + links[count][0] + "</a></li>");}</script>
</ul>


</td>

<script language=javascript>
writerightnav();
closepage();
</script>


</body>

</html>

There is a mainscript.js that contains the functions, but the problem seems to be in this .htm file.

Thank you for your help!

Reply With Quote
  #2  
Old March 27th, 2007, 01:29 AM
eralpery eralpery is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Apr 2006
Posts: 16 eralpery User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 h 19 m 57 sec
Reputation Power: 0
Hi,

In one of the .js files the links object is set to some list of values. I guess it is lists.js
The html page code is not helpful since it creates alot of errors and also I can not see whether there is a javascript code related with links variable in the included javascript files.

Eralper
http://www.kodyaz.com

Reply With Quote
  #3  
Old May 12th, 2007, 07:26 AM
blitz01 blitz01 is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Mar 2007
Posts: 7 blitz01 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 h 19 m 52 sec
Reputation Power: 0
Quote:
Originally Posted by ginaco
Can anyone help me with this problem?
Error: 'links[..].1" is null or not an object


Code:
for (count=0;count<links.length;count++)


links.length is not the amount of times you want to loop.
don't forget an array starts with links[0] so you want to loop one less time..
loopAmount = links.length -1
that's what is causing the error..
on the last loop : links[is not there +1 more than you have]

just replied to the same question from 2003! lol was doing a search -- so i ended up here... funny

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingJavaScript Development > Error: 1 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 1 hosted by Hostway
Stay green...Green IT