<%
Session.CodePage=65001
Response.Charset="UTF-8"
Dim action, submitLabel, message, color, data
color = "#000000"
if request.servervariables("HTTP_METHOD")="POST" then
data=request.form("data")
if data="" then
message = "The field can not be empty"
color = "#FF0000"
action="doubleSubmit.asp"
submitLabel="Re-Validate"
else
message = "Validation Successful, Press Submit"
action = "doubleSubmitHandler.asp"
submitLabel="Submit"
end if
else
message="Complete Form"
action="doubleSubmit.asp"
submitLabel="Validate"
end if
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
<title>validation form</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="author" content="Roderick Divilbiss">
<meta name="copyright" content="© 2005, 2006 Roderick Divilbiss">
</head>
<body>
<span style="color:<%=color%>;"><%=message%></span>
<form method="POST" action="<%=action%>">
<p>Enter Data: <input type="text" name="data" size="20" value="<%=data%>"><br>
<br><input type="submit" value="<%=submitLabel%>" name="submit"></p>
</form>
</body>
</html>
© Coyright 2000-2008, Roderick (Rod) W. Divilbiss. Some rights reserved.
Except where otherwise noted, this site, all content, and all source code and markup is licensed under a Creative Commons License
Creative Commons License.
No part of this web site including all application code and examples may be used for commercial purposes without prior written permission from the author,
Roderick W. Divilbiss of Overland Park, Kansas, United States of America.