Hi,
I'm trying to assign the current date to the hidden field SndDate and the current time to the hidden field SndTime.
Here is the code I’m using in the two files.
File Tform.htm contains the following code:
<html>
<head>
<meta http-equiv="Content-Language" content="pt">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
</head>
<body>
<form method="POST" action="tsend.asp" onsubmit="return FrontPage_Form1_Validator(this)" language="JavaScript" name="FrontPage_Form1">
<p>
<!--webbot bot="Validation" s-data-type="Integer" s-number-separators="x" --><input type="text" name="ClienteID" size="20"></p>
<p><input type="submit" value="Submit" name="B1"><input type="reset" value="Reset" name="B2"></p>
<input type="hidden" name="SndDate" value="">
<input type="hidden" name="SndTime" value="">
</form>
</body>
</html>
File Tsend.asp contains the following code:
<head>
</head>
<%
dim Mail
Set Mail = Server.CreateObject("Persits.MailSender")
LcUser=Request.ServerVariables("LOGON_USER")
LcAgen=Request.ServerVariables("HTTP_USER_AGENT")
LcAddr=Request.ServerVariables("REMOTE_ADDR")
Mail.Host = "localhost"
Mail.From = "Sender_Address@somesite.com"
Mail.FromName = "WebSite Form"
Mail.AddAddress "Destination_Address@somesite.com"
Mail.Subject = "Form Results"
Mail.IsHTML = True
Mail.Body = "<HTML><BODY><LEFT>"+"Cliente ID: "+Request("ClienteID")+"<P>User: "+LcUser+"<P>Address: "+LcAddr+"<P>User Agent: "+LcAgen+"<P>"+"Date: "+Request("SndDate")+"<P>"+"Time: "+Request("SndTime")+"<P></LEFT></BODY></HTML>"
On Error Resume Next
Mail.Send
If Err <> 0 Then
Response.Write "An error occurred: " & Err.Description
end if
%>
<body>
<div align="center">
</div>
</body>
Can anyone help?