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 Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

submit but maintain rst?

Status
Not open for further replies.

DirtDawg

IS-IT--Management
Apr 17, 2002
218
JP
I have set up a page that when the submit buttun is ran it submits to it self. Please see the code below.

<%@ language = "VBScript" %>
<!-- #INCLUDE FILE = "..\..\..\..\includes\sessioncheck.inc" -->
<!-- #INCLUDE FILE = "..\..\..\..\includes\weeks\jp.inc" -->
<html>

<%

strwkn = Request.form("wkn")
strsrv = request.form ("srv")
strcom = Replace(Request.form("com"), "'", "`")

Set oCnn = Server.CreateObject("ADODB.Connection")
oCnn.Open "DSN=dsn","id", "pass"
sqlstring = "select top 4 vslvoy, wkn, srv from VSL where wkn between '" & strwkn & "' and ('" & strwkn & "')+4 and srv = '" & strsrv & "' order by wkn"
SET rs = oCnn.Execute(sqlstring)

%>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<meta http-equiv="Content-Language" content="en-us">
<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
<meta name="ProgId" content="FrontPage.Editor.Document">

<title>Regional Far East Management Website</title>
</head>

<body style="text-align: center">

<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%" id="AutoNumber1" height="31">
<tr>
<td width="9%" height="1" align="center" bgcolor="#FFFFFF">
&nbsp;</td>
<td width="46%" height="1" align="center" bgcolor="#FFFFFF"><b>
<font size="5">Regional Far East Management Website</font></b></td>
<td width="14%" height="1" align="center" bgcolor="#FFFFFF">
<b><%= FormatDateTime(Date(),2)%></b></font></td>
</tr>
</table>

<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%" id="AutoNumber1" height="497">
<tr>
<td width="9%" height="453" align="center">
<p><Form Name="rp" Form Action ="../rp/rp.asp" Method="post">
<input type="submit" value="Report" name="rp"></p></form>
<p><Form Name="mn" Form Action ="../../../menu.asp" Method="post">
<input type="submit" value="Main Menu" name="pos"></p></form>
<p><Form Name="lg" Form Action ="../../../../login.asp" Method="post">
<input type="submit" value="Logout" name="lg"></td></form>
<td width="57%" height="453" align="center" valign="top" bgcolor="#FFFFFF">
&nbsp;<p><b>4 Weeks Forecasting</b></p>
<form method="post" action="wk4.asp" name= "1">
<input type="hidden" name="frwk" size="4" value="1">
<p>Week Number:
<input type="text" readonly="readonly" name="wkn" size="8" style="text-align: center" value="<% response.write(rs("wkn")) %>">&nbsp;&nbsp;&nbsp;
Service:
<input type="text" readonly="readonly" name="srv" size="7" style="text-align: center" value="<% = Request.form("srv") %>">&nbsp; </p>
Vessel/Voyage:&nbsp;<b>
<input type="text" readonly="readonly" name="vslvoy" size="27" style="text-align: center" value="<% response.write(rs("vslvoy")) %>"></b>
<p align="center">Lifting:<input type="text" name="lift" size="7" value="0" style="text-align: center">&nbsp;&nbsp;&nbsp;
Allocation:<input type="text" name="alloc" size="6" value="0" style="text-align: center"></p>
<p align="center">Comments</p>
<p align="center"><textarea rows="5" name="com" cols="50"></textarea></p>
<p><b><font color=red><% = SMessage1 %></font></b></p>
<p><input type="submit" value="Submit" name="cmdsubmit1" id="cmdSubmit1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<input type="reset" value="Reset"></p>
</form><% rs.movenext %>

the form is ran 3 other times. I would like to keep the smae record set until the user leaves the page. Is this Possible? I do not want the page to update until user press refresh or re logins tot he home page.

 
nevermind I figured it out myself I but a test box in as hidden and used request.form to solve the problem.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top