Flasher Archive

[Previous] [Next] - [Index] [Thread Index] - [Previous in Thread] [Next in Thread]


Subject: JavaScript Problems
From: TheGilster
Date: Sun, 21 Jun 1998 14:10:31 +0100

Hey Everybody,
I was wondering if anybody could help me out with this JavaScript problem
I've been having. I am trying to get the day-translate it from a number to a
name-and then have the script write the name of the day to the document using
write.document . My IE says that there is an error on Line 10 Char 1
expecting an object. Here is the html...

<html>

<head>
<title>New Page </title>
</head>

<body>
<script LANGUAGE="JavaScript">
var now = newDate( );
var day = now.getDay( );
var dayname;
if (day == 0) dayname = "Sunday";
if (day == 1) dayname = "Monday";
if (day == 2) dayname = "Tuesday";
if (day == 3) dayname = "Wednesday";
if (day == 4) dayname = "Thursday";
if (day == 5) dayname = "Friday";
if (day == 6) dayname = "Saturday";
document.write("Today is " + dayname + ". ");
</script>

</body>
</html>

Thanks,
Gil.

------------------------------------------------------------------------
To UNSUBSCRIBE send: unsubscribe flasher in the body of an
email to list-manageratshocker [dot] com. Problems to: owneratshocker [dot] com
N.B. Email address must be the same as the one you used to subscribe.
For info on digest mode send: info flasher to list-manageratshocker [dot] com


Replies
  Re: JavaScript Problems, Jason Nugent

[Previous] [Next] - [Index] [Thread Index] - [Next in Thread] [Previous in Thread]