Hi
I have inherited an ASP page, which when the user clicks proceed, the second page runs this (i.e passes the values from the first page as hidden)
<%
Function IncludeHidden()
For each Field in Request.Form
TheString="<input type=""HIDDEN"" name=""" & Field & """ value="""
StrValue = Request.Form(Field)
TheString=TheString + cstr(StrValue) & """>" & VbCrLf
Response.Write TheString
Next
End Function
%>
There is a third page which does the same - then the user is taken to a submit.asp page which does this (inserts the values into a Databases)
<%
Dim myConn
Dim SQLString
Set myConn = Server.CreateObject("ADODB.Connection"![Wink ;) ;)](data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)
connStr = "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & server.mappath("HsgPlanApp.mdb"![Wink ;) ;)](data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)
myConn.Open connStr,"",""
SQLString = "INSERT INTO tblHsgPlanApp ("
For each Field in Request.Form
SQLString = SQLString & Field & ", "
Next
SQLString = Left(SQLString, (Len(SQLString) -2))
SQLString = SQLString + "
VALUES ("
For each Field in Request.Form
StrValue = Request.Form(Field)
SQLString = SQLString + "'" & Request(Field) & "', "
Next
SQLString = Left(SQLString, (Len(SQLString) -2))
SQLString = SQLString + "
;"
response.write SQLString
myConn.Execute(SQLString)
On the Submit.asp page I have a link to PrintPage.asp called by this.
<script language="JavaScript">
<!--
function open_new_window(url)
{
new_window = window.open(url,'window_name','toolbar=0,menubar=0,resizable=0,dependent=0,status=0,width=400,height=300,left=25,top=25')
}
</script>
<a href="javascript
pen_new_window(' Form</a>
I want this PrintPage.asp to display all the values in basic text format (i.e. a label and a value) - I know I can't use request.form, because submit.asp doesn't have any form tags
Any help much appreciated
Richey
I just want PrintPage.asp
I have inherited an ASP page, which when the user clicks proceed, the second page runs this (i.e passes the values from the first page as hidden)
<%
Function IncludeHidden()
For each Field in Request.Form
TheString="<input type=""HIDDEN"" name=""" & Field & """ value="""
StrValue = Request.Form(Field)
TheString=TheString + cstr(StrValue) & """>" & VbCrLf
Response.Write TheString
Next
End Function
%>
There is a third page which does the same - then the user is taken to a submit.asp page which does this (inserts the values into a Databases)
<%
Dim myConn
Dim SQLString
Set myConn = Server.CreateObject("ADODB.Connection"
connStr = "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & server.mappath("HsgPlanApp.mdb"
myConn.Open connStr,"",""
SQLString = "INSERT INTO tblHsgPlanApp ("
For each Field in Request.Form
SQLString = SQLString & Field & ", "
Next
SQLString = Left(SQLString, (Len(SQLString) -2))
SQLString = SQLString + "
For each Field in Request.Form
StrValue = Request.Form(Field)
SQLString = SQLString + "'" & Request(Field) & "', "
Next
SQLString = Left(SQLString, (Len(SQLString) -2))
SQLString = SQLString + "
response.write SQLString
myConn.Execute(SQLString)
On the Submit.asp page I have a link to PrintPage.asp called by this.
<script language="JavaScript">
<!--
function open_new_window(url)
{
new_window = window.open(url,'window_name','toolbar=0,menubar=0,resizable=0,dependent=0,status=0,width=400,height=300,left=25,top=25')
}
</script>
<a href="javascript
I want this PrintPage.asp to display all the values in basic text format (i.e. a label and a value) - I know I can't use request.form, because submit.asp doesn't have any form tags
Any help much appreciated
Richey
I just want PrintPage.asp