Hi I don't understand why I keep getting "Error: Object expected" I
tried different things and haven't been able to solve it. I'm a newbie
so I'm not sure what I'm doing wrong. The debugger breaks at the
<BODY> Tag of my code so I'm thinking the problem is with my
InitPage() function. I appreciate the advice. Here is my code.
<SCRIPT LANGUAGE="Javas cript">
<!--
var flag = false;
function InitPage()
{
document.MyForm .Datebox.value = getCurrentDate( );
}
function MyForm_onsubmit ()
{
// Check Date Open Box
if ( checkDate(docum ent.MyForm.Date box.value) == false )
{ alert("You must provide a Date")
return false;
}
}
// -->
</SCRIPT>
<HTML>
<HEAD>
<TITLE>Dummy Title </Title>
</HEAD>
<BODY onload="InitPag e();" bgColor=#0a357e text=White Link=White
vLink=White aLink=White>
<form name = "MyForm" method="post" action="addIssu e.asp"
onsubmit= "return MyForm_onsubmit ()" >
Date Opened <input name="Datebox"> Format : dd/mm/YYYY
<input type="submit" value="Save Details" name="Save_Butt on">
<input type="reset" value="Clear Details" name="Clear_But ton">
</form>
</BODY>
</HTML>