Pelle
03-31-2005, 10:17 AM
I have two pages called "link.htm" and "form.asp". The only thing present in the link URL is a link that will take you to the "form.asp" page. This form, of course, can be submitted but is always submitted to itself (action=form.asp). Everything works fine but I want it to be impossible to go back in the browser history by using the left arrow in the browser (if I have to watch the previous forms...). Assume I submit the form several times and then click the left arrow to go back in the browser's history. Then I want to be sent directly to the "link.htm" again without having to see all the previous submitted forms. Hope you understand what I mean and have a useful solution to my problem.
Here is the code..
"link.htm"
<html>
<head>
</head>
<body>
<a href="form.asp">Go to form</a>
</body>
</html>
form.asp
<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<%
Dim radio1
Dim radio2
radio1 = request.Form("radio1")
radio2 = request.Form("radio2")
%>
<html>
<head></head>
<body>
Radio group 1=<%=radio1%>
Radio group 2=<%=radio2%>
<form name="form1" method="post" action="" target="_self">
<p>
<input name="Radio1" type="radio" value="1" checked>
Group 1 value 1<br>
<input type="radio" name="Radio1" value="2">
Group 1 value 2<br>
<input type="radio" name="Radio1" value="3">
Group 1 value 3</p>
<p>
<input name="Radio2" type="radio" value="1" checked>
Group 2 value 1<br>
<input type="radio" name="Radio2" value="2">
Group 2 value 2</p>
<p>
<input type="submit" name="Submit" value="Submit form">
</p>
</form>
</body>
</html>
Here is the code..
"link.htm"
<html>
<head>
</head>
<body>
<a href="form.asp">Go to form</a>
</body>
</html>
form.asp
<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<%
Dim radio1
Dim radio2
radio1 = request.Form("radio1")
radio2 = request.Form("radio2")
%>
<html>
<head></head>
<body>
Radio group 1=<%=radio1%>
Radio group 2=<%=radio2%>
<form name="form1" method="post" action="" target="_self">
<p>
<input name="Radio1" type="radio" value="1" checked>
Group 1 value 1<br>
<input type="radio" name="Radio1" value="2">
Group 1 value 2<br>
<input type="radio" name="Radio1" value="3">
Group 1 value 3</p>
<p>
<input name="Radio2" type="radio" value="1" checked>
Group 2 value 1<br>
<input type="radio" name="Radio2" value="2">
Group 2 value 2</p>
<p>
<input type="submit" name="Submit" value="Submit form">
</p>
</form>
</body>
</html>