Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

document.frmOrder.reset doesn't work

Status
Not open for further replies.

thibault

Programmer
Sep 8, 1999
44
US
function setFocus() {
document.frmOrder.reset;
document.frmOrder.Store.focus(); // set initial focus
vDate = new Date(); // set default date
vMonth = vDate.getMonth();
vMonth = vMonth + 1;
if (vMonth<10) vMonth = (&quot;0&quot; + vMonth.toString());
vDay = vDate.getDate();
if (vDay<10) vDay = (&quot;0&quot; + vDay.toString());
vYear = vDate.getYear();
sDate = (vMonth + &quot;/&quot; + vDay + &quot;/&quot; + vYear);
document.frmOrder.ordDate.value = sDate;
document.frmOrder.RequestType.value = &quot;-1&quot;;
}

in order to get this to run properly i had to change the object, the onClick of which called the function from a reset to a button. so i added the document.frmOrder.reset command and it is completely ignoring it.
help:)

bobbie
thibault@hotbot.com
 
reset is a method of the form, just like focus is a method of an object, so try:

document.frmOrder.reset();


Simon
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top