Hi,

I have a simple ASP guestbook, and I am trying to get the date to input along with the text. However, I cannot get the javascript (which I use to get the date) into the form to enable it to be submitted. The code is:


<TD ALIGN="left"><B>Name/B></TD>
<TD><INPUT TYPE="text" NAME="name" SIZE="15"></INPUT></TD>
</TR>
<TR>
<TD ALIGN="left"><B>Comment/B></TD>
<TD><INPUT TYPE="text" NAME="comment" SIZE="60"></INPUT></TD>
</TR>
<TR>
<TD ALIGN="left"><B>Date/B></TD>
<TD><INPUT TYPE="text" NAME="date" SIZE="10>
<SCRIPT LANGUAGE="JavaScript">
<!--
Stamp = new Date();
document.write('<font size="2" face="Arial"><B>' + (Stamp.getMonth() + 1) +"/"+Stamp.getDate()+ "/"+Stamp.getYear() + '</B></font> ');
var Hours;
var Mins;
var Time;
Hours = Stamp.getHours();
if (Hours >= 12) {
Time = " P.M.";
}
else {
Time = " A.M.";
}

if (Hours > 12) {
Hours -= 12;
}

if (Hours == 0) {
Hours = 12;
}

Mins = Stamp.getMinutes();

if (Mins < 10) {
Mins = "0" + Mins;
}

document.write('<font size="2" face="Arial"><B>' + Hours + ":" + Mins + Time + '</B></font>');

//-->
</SCRIPT></INPUT>
</TD>
</TR>
</TABLE>
The final date part is the bit I'm having problems with. In it's current state the time appears after the input box. I know this is not the correct wat, I just need another way to submit the date (currently using
objFile.Write Server.HTMLEncode(Request.Form("name"))
). If you need the entire ASP code, then please ask!

Many thanks,

Joel