Help, Updated Time shown as 1969?! - My script doesn't work on Netscape.

They have: 21 posts

Joined: Jun 1999

Please help.

I just found that on Netscape the updated time shown on my page at http://lawstudent.8m.com was 12/31/69 while it should have been 7/23/99. On my other page at http://cyberlaw.8m.com it was shown updated on 7/10/99 while it should have been 7/23/99 too!

On IE both pages work fine.

The script I used was:
<script Language="JavaScript">
<!-- hide from old browsers
var modDate = new Date(document.lastModified)

document.write("Updated: " + (modDate.getMonth()+1) + "/" +
modDate.getDate() + "/" + modDate.getYear())
//-->
</script>

Please help. It's quite an embarrassing error.

Thanks.
M.

They have: 2,390 posts

Joined: Nov 1998

euh, went to look at your site in Netscape and got swamped in js errors, could not even check the code... Sad
JP

----------
The Webmaster Promotion and Resource Center.
http://www.what-next.com

They have: 21 posts

Joined: Jun 1999

??? I have used Netscape 4.6 to check them and didn't get any errors, except for the "last updated" time.

John Pollock's picture

He has: 628 posts

Joined: Mar 1999

Out of curiosity, where is the site hosted? I think I tried that before on a free host and it did the same sort of thing.

Try testing it on your computer to see if you get the right date in there. You may have to modify the document first. Smiling

If it is right on your computer it may be something to do with the ways files are saved at the hosting company, but then again it may not be the host at all...it could just be something I'm missing here. Smiling

----------
Page Resource: http://www.pageresource.com
JavaScript City: http://www.javascriptcity.com

They have: 46 posts

Joined: Jun 1999

What you have to do, is just change the subject of your site...

If you make a site on... let's say... timetraveling, you don't have to worry about that anymore... Wink

Always on the rescue,

----------
Leech.
anti people, now you've gone too far... here's your antichrist superstar!

They have: 11 posts

Joined: Jul 1999

Try this :

<SCRIPT LANGUAGE="JavaScript">
<!--
document.write("Updated : ");
document.write(document.lastModified);
// -->
</SCRIPT>

..instead of having a variable.

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.