T
Treetop
I get the following error in IE but not in Netscape. The code works,
and the error only shows up if you click on the icon in the bottom
left corner of the screen, next to where it says Error on Page... I
would like to know what the error means and how to fix it.
The site is at www.tricityarena.com
error ae[...].0' is null or not an object
here is my code
var today = new Date();
var dayarray=new Array("Sun","Mon","Tue","Wed","Thu","Fri","Sat")
var montharray=new
Array("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov
","Dec")
document.write('<table>');
var ae=new Array();
ae[10]=new Array("2004/1/16 23:59:59","<b>Stick and Puck Hockey<\/b> -
11:30am-1:00pm");
ae[9]=new Array("2004/3/26 23:59:59","<b>Diesel Football Home
Opener<\/b> vs Casper, WY - 7:30 pm");
for (var i=ae.length-1;i>=0;i--)
{
var date = new Date(ae[0])
var year = 1900 + date.getYear()%1900 // < AD 3800
if (today.getTime() <= date.getTime()) {
document.write('<tr><td valign=top>' + dayarray[date.getDay()]+",
"+montharray[date.getMonth()]+" "+date.getDate()+", "+year+" " +
' </td><td> ' + ae[1] + '</td></tr>');
document.write('<tr><td colspan="2"> </td></tr>');
}
}
document.write('</table>');
and the error only shows up if you click on the icon in the bottom
left corner of the screen, next to where it says Error on Page... I
would like to know what the error means and how to fix it.
The site is at www.tricityarena.com
error ae[...].0' is null or not an object
here is my code
var today = new Date();
var dayarray=new Array("Sun","Mon","Tue","Wed","Thu","Fri","Sat")
var montharray=new
Array("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov
","Dec")
document.write('<table>');
var ae=new Array();
ae[10]=new Array("2004/1/16 23:59:59","<b>Stick and Puck Hockey<\/b> -
11:30am-1:00pm");
ae[9]=new Array("2004/3/26 23:59:59","<b>Diesel Football Home
Opener<\/b> vs Casper, WY - 7:30 pm");
for (var i=ae.length-1;i>=0;i--)
{
var date = new Date(ae[0])
var year = 1900 + date.getYear()%1900 // < AD 3800
if (today.getTime() <= date.getTime()) {
document.write('<tr><td valign=top>' + dayarray[date.getDay()]+",
"+montharray[date.getMonth()]+" "+date.getDate()+", "+year+" " +
' </td><td> ' + ae[1] + '</td></tr>');
document.write('<tr><td colspan="2"> </td></tr>');
}
}
document.write('</table>');