‘Hey Guys have a question .
Have 3 asp pages. The first page displays information with a select statement on all bill from a dept.
Each of these bills it displays is a hyperlink which when clicked opens up a second page with just a more detailed information about that bill picked. This 2nd page in addition gives the user the functionality of adding a comment or updating on the bill and submitting it.This 2nd format is set up as a form with input boxes and text areas.
The third page is just a confirmation page but also where the actual update statement is written.
All this works fine.However this is what I want to achieve. I need to change the look and feel of the 2nd page which has the input box format /look to just a page that looks like a a written text. I know I can display the infor with eg <%=RS("comments")%> but how can the user make an update on the 2nd page without a form ,? How can infor entered on the page be submitted without a form?
below is a brief code for the , 2nd & 3rd page .How can I revise these pages to achieve my goal. Thanks as always
****2nd page
<%
billNO = request.querystring("billNo")
Set Conn = Server.CreateObject("ADODB.Connection")
Set Rs = Server.CreateObject("adodb.Recordset")
Conn.Open "eiwp"
SQLQuery = "SELECT * FROM tblopgaCOm2 WHERE billNo = '" & billNo & "'"
RS.Open SQLQuery ,Conn,1,1
strBillNo=RS("billNo")
SQLQuery1= "Select area FROM tblopgaCOm2 WHERE billNo = '"&strBillNo&"'"
Set RS1=Conn.Execute(SQLQuery1)
%>
<div align="left">
<form method="POST" action="legconfirm.asp" >
<table border="0" cellpadding="2" cellspacing="4" width="100%">
<td width="155%" bgcolor="#C0C0C0" height="36" colspan="5"><b><font size="2">BILL</font>#</b>
<b><font color="#000080">
<input type="text" name="billNo" style="background-color: #D2D2D2; font-weight: bold; color: #000080" size="9" value="<%=RS("billNo")%>" readonly></font></b> <font size="2"><b>READER:
</b>
<input type="text" name="rdr3rd" style="background-color: #D2D2D2; font-weight: bold" size="13" value="<% if RS("rdr3rd")= "Y" Then
Response.write("3rd Reader")
Else
Response.write ("")
End if%>" readonly </td></font></td><b><font color="#000080"><input type="text" name="area" style="background-color: #D2D2D2; color: #000080; font-weight: bold; text-align: Left" size="8" value="<%=RS("area")%>" readonly>
<input type="text" name="Test" size="6" value="<%=RS("Test")%>" style="color: #C0C0C0; background-color: #C0C0C0"></font></b></td>
<td width="142%" height="36"> </td>
<tr>
<td width="182%" bgcolor="#C0C0C0" height="36" colspan="5"><b><font size="2"> COMMENTS
DATE:</font></b> OTHER
AREARS FOR COMMENTS</b></font><b><font size="2">:</font></b></td>
<td width="159%" bgcolor="#E6E3E4" height="36" colspan="4">
<textarea rows="2" name="otherdescription" readonly style="background-color: #D2D2D2" cols="27">
<% Do Until RS1.EOF
Response.write RS1("area")&","
RS1.MoveNext
Loop
RS1.Close
%>
</textarea>
****3rd Page
Test=Trim(Request.form("Test"))
StrbillNo = Trim(Request.form("billNo"))
Strarea = Trim(Request.form("area"))
Strcomments = Trim(Request.form("comments"))
Strpriorcomments = Trim(Request.form("priorcomments"))
Set Conn = Server.CreateObject("ADODB.Connection")
Set RS = Server.CreateObject("ADODB.RecordSet")
Conn.Open "eiwp"
SQlstmt = "Update tblopgaCom2 Set "
SQLStmt = SQlstmt & "comments ='" & "" & "',"
SQLStmt = SQlstmt & "priorcomments ='" & Strpriorcomments & "."&" "& ";" & vbcrlf & Strcomments & "',"
SQLStmt = SQlstmt & "updDate=#" & Date & "#, "
SQLStmt = SQlstmt & "[Time] =#" & time() & "# "
SQLStmt = SQlstmt & " Where Test =" & Test
Conn.Execute(SQLStmt)
Conn.Close
set RS=Nothing
Set Conn=Nothing
%>
Have 3 asp pages. The first page displays information with a select statement on all bill from a dept.
Each of these bills it displays is a hyperlink which when clicked opens up a second page with just a more detailed information about that bill picked. This 2nd page in addition gives the user the functionality of adding a comment or updating on the bill and submitting it.This 2nd format is set up as a form with input boxes and text areas.
The third page is just a confirmation page but also where the actual update statement is written.
All this works fine.However this is what I want to achieve. I need to change the look and feel of the 2nd page which has the input box format /look to just a page that looks like a a written text. I know I can display the infor with eg <%=RS("comments")%> but how can the user make an update on the 2nd page without a form ,? How can infor entered on the page be submitted without a form?
below is a brief code for the , 2nd & 3rd page .How can I revise these pages to achieve my goal. Thanks as always
****2nd page
<%
billNO = request.querystring("billNo")
Set Conn = Server.CreateObject("ADODB.Connection")
Set Rs = Server.CreateObject("adodb.Recordset")
Conn.Open "eiwp"
SQLQuery = "SELECT * FROM tblopgaCOm2 WHERE billNo = '" & billNo & "'"
RS.Open SQLQuery ,Conn,1,1
strBillNo=RS("billNo")
SQLQuery1= "Select area FROM tblopgaCOm2 WHERE billNo = '"&strBillNo&"'"
Set RS1=Conn.Execute(SQLQuery1)
%>
<div align="left">
<form method="POST" action="legconfirm.asp" >
<table border="0" cellpadding="2" cellspacing="4" width="100%">
<td width="155%" bgcolor="#C0C0C0" height="36" colspan="5"><b><font size="2">BILL</font>#</b>
<b><font color="#000080">
<input type="text" name="billNo" style="background-color: #D2D2D2; font-weight: bold; color: #000080" size="9" value="<%=RS("billNo")%>" readonly></font></b> <font size="2"><b>READER:
</b>
<input type="text" name="rdr3rd" style="background-color: #D2D2D2; font-weight: bold" size="13" value="<% if RS("rdr3rd")= "Y" Then
Response.write("3rd Reader")
Else
Response.write ("")
End if%>" readonly </td></font></td><b><font color="#000080"><input type="text" name="area" style="background-color: #D2D2D2; color: #000080; font-weight: bold; text-align: Left" size="8" value="<%=RS("area")%>" readonly>
<input type="text" name="Test" size="6" value="<%=RS("Test")%>" style="color: #C0C0C0; background-color: #C0C0C0"></font></b></td>
<td width="142%" height="36"> </td>
<tr>
<td width="182%" bgcolor="#C0C0C0" height="36" colspan="5"><b><font size="2"> COMMENTS
DATE:</font></b> OTHER
AREARS FOR COMMENTS</b></font><b><font size="2">:</font></b></td>
<td width="159%" bgcolor="#E6E3E4" height="36" colspan="4">
<textarea rows="2" name="otherdescription" readonly style="background-color: #D2D2D2" cols="27">
<% Do Until RS1.EOF
Response.write RS1("area")&","
RS1.MoveNext
Loop
RS1.Close
%>
</textarea>
****3rd Page
Test=Trim(Request.form("Test"))
StrbillNo = Trim(Request.form("billNo"))
Strarea = Trim(Request.form("area"))
Strcomments = Trim(Request.form("comments"))
Strpriorcomments = Trim(Request.form("priorcomments"))
Set Conn = Server.CreateObject("ADODB.Connection")
Set RS = Server.CreateObject("ADODB.RecordSet")
Conn.Open "eiwp"
SQlstmt = "Update tblopgaCom2 Set "
SQLStmt = SQlstmt & "comments ='" & "" & "',"
SQLStmt = SQlstmt & "priorcomments ='" & Strpriorcomments & "."&" "& ";" & vbcrlf & Strcomments & "',"
SQLStmt = SQlstmt & "updDate=#" & Date & "#, "
SQLStmt = SQlstmt & "[Time] =#" & time() & "# "
SQLStmt = SQlstmt & " Where Test =" & Test
Conn.Execute(SQLStmt)
Conn.Close
set RS=Nothing
Set Conn=Nothing
%>