[thelist] Onload not finding JS function

Cymbala, Greg Greg.Cymbala at Den.Galileo.com
Mon Jun 24 11:40:00 CDT 2002


"Var" should be "var" and "New" should be "new".  Also ...

GetMonth should be  getMonth
GetDay   should be  getDay
GetYear  should be  getYear

JavaScript is case-sensitive.

-----Original Message-----
From: Tab Alleman [mailto:Tab.Alleman at realmetros.com]
Sent: Monday, June 24, 2002 10:26 AM
To: thelist at lists.evolt.org
Subject: [thelist] Onload not finding JS function


I've got a page that starts with this:


<html>
<head>
 <title>
   blahblah
 </title>
 <SCRIPT LANGUAGE="JavaScript">
<!--
function SetDates()
	{
	alert("Now in SetDates!");
	Var Today = New Date();
	Var ThisMonth = Today.GetMonth();
	Var ThisDay = Today.GetDay;
	Var ThisYear = Today.GetYear;
	document.mainForm.arrivalMonth.SelectedIndex = ThisMonth;
	}
//-->
</SCRIPT>
</head>
<body text=#000000 link=#0033FF vlink=#0033CC bgcolor=#0000CC
onLoad="SetDates()"> ...

But when I load the page, I get an error "Object Expected" in the "<body..."
line, and the alert does not triggered.

What am I missing?

TIA
Tab


The information in this electronic mail message is sender's business
Confidential and may be legally privileged.  It is intended solely for the
addressee(s).  Access to this Internet electronic mail message by anyone
else is unauthorized.  If you are not the intended recipient, any
disclosure, copying, distribution or any action taken or omitted to be taken
in reliance on it is prohibited and may be unlawful.
The sender believes that this E-mail and any attachments were free of any
virus, worm, Trojan horse, and/or malicious code when sent. This message and
its attachments could have been infected during  transmission. By reading
the message and opening any attachments, the recipient accepts full
responsibility for taking protective and remedial action about viruses and
other defects. Galileo International is not liable for any loss or damage
arising in any way from this message or its attachments.





More information about the thelist mailing list