I have got a page that is intended to display more than one record per userid.
Here is an example:
I have a page called displayJustify.asp which has 7 form objects.
Each has a single record but one field called Specifications is intented to have multiple values.
As a result, you will have a result similar to this:
Userid
1
FullName
Pete Samprass
Address
122 samprass dr
Specifications yes No
'Samprass is a tennis player' yes
'Samprass is a 13 time wimbledon champion' yes
'Samprass won the us open in 2001' yes
As you can see from above example, there is only one userid
but there are 3 specifications entered for that userid.The total number of specifications could be less than 3 or more than 3.
I was wondering if there is a way to code this form to dynamically keep opening up new rows until all values for specifications and Yes/No field are displayed on the form.
I know I will have to add paging to navigate from page to page but that is critical right now.
Here is the page.
<html>
<head>
<title>Display Justifications</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body bgcolor="ffffff">
<%
set my_conn= Server.CreateObject("ADODB.Connection"
myDSN="DSN=justify"
'response.write mydsn
'response.end
my_Conn.Open myDSN
strsql ="SELECT * FROM tbl_persons, tbl_events WHERE tbl_persons.justifyID = tbl_events.eventID "
set rs = my_conn.Execute (StrSql)
'response.write("strsql"
'response.end
if rs.BOF or rs.EOF then ' No records found
response.write "Hmm... That didn't work.<br>There was an error. Oh well, try again.<a href=javascript:history.back();>back</a>"
response.end
end if
%>
<form name="display" method="post" action="displayjustification.asp">
<p><center><b>FC <BR>DPW</b></center></p>
<div align="center">
<table width="88%" border="1" bordercolor="000000">
<tr>
<td>
<div align="left">
<table><tr><td><b>TITLE: SPECIFICATION FOR A </b></td><td>
<%
Response.Write("<INPUT TYPE='TEXT' SIZE='40' NAME='txtSpecName' VALUE='" & rs("SpecName" & "' >"
%>
</td><td><b>OR EQUAL.</b></td></tr></table>
</div>
<div align="left">
<table>
<tr>
<td>
<p>
</td>
</tr>
<br><br>
<tr>
<td><b>
**NOTE**
</b></td>
</tr>
<tr>
<td>
<b>THE</b>
</td>
<td>
<%
Response.Write("<INPUT TYPE='TEXT' SIZE='40' NAME='txtOfferName' VALUE='" & rs("OfferName" & "' >"
%>
</td>
<td>
<b>OFFERED SHALL BE</b>
</td>
</tr>
</table>
</div>
<p>
<b>COMPARABLE WITH THE DETAILED REQUIREMENTS LISTED BELOW<br>
UNLESS OTHERWISE NOTED. ALL BIDDERS SHALL INDICATED EXACTLY<br>
WHAT THEY ARE OFFERING IN THE FOLLOWING BLANKS UNDER<br>
"BIDDERS RESPONSE". ALL EXCEMPTIONS TO NON COMPLYING<br>
DETAILED FEATURES MUST BE IDENTIFIED AND EXPLAINED
</b></p>
<div align="left">
<table>
<tr>
<td>
<b>MAKE & MODEL PROPOSED</b>
</td>
<td>
<%
Response.Write("<INPUT TYPE='TEXT' SIZE='40' NAME='txtMakeModel' VALUE='" & rs("MakeModel" & "' >"
%>
</td>
</tr>
<tr>
<td>
<b>ALTERNATE MAKE & MODEL PROPOSED</b>
</td>
<td>
<%
Response.Write("<INPUT TYPE='TEXT' SIZE='40' NAME='txtAlternateModel' VALUE='" & rs("AlternateModel" & "' >"
%>
</td>
</tr>
</table>
</div>
<br>
<div align="left">
<table>
<tr>
<td>
<font color="green"><b>* All Vendors Must Mark "Yes" or "No" To Comply With Each Individual Specification Below.</b></font>
</td>
</tr>
</table>
</div>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td>Specifications </td>
<td align="right">Yes</td>
<td align="right">No</td>
</tr>
<tr>
<td>
<%
Response.Write("<INPUT TYPE='TEXT' SIZE='80' NAME='txtItemDesc' VALUE='" & rs("ItemDesc" & "' >"
%>
</td>
<td>
<%
Response.Write("<INPUT TYPE='TEXT' SIZE='2' NAME='txtYes' VALUE='" & rs("TheYes" & "' >"
%>
</td>
<td>
<%
Response.Write("<INPUT TYPE='TEXT' SIZE='2' NAME='txtNo' VALUE='" & rs("TheNo" & "' >"
%>
</td>
</table>
</div>
<div align="left">
<table>
<tr>
<td>
<b>FOR ADDITIONAL INFORMATION PLEASE CONTACT</b>
</td>
</tr>
</table>
</div>
<div align="left">
<table>
<tr>
<td>
<%
Response.Write("<INPUT TYPE='TEXT' SIZE='28' NAME='txtContactName' VALUE='" & rs("ContactName" & "' >"
%>
</td>
<td>
<b>AT</b>
</td>
<td>
<%
Response.Write("<INPUT TYPE='TEXT' SIZE='28' NAME='txtContactEmail' VALUE='" & rs("ContactEmail" & "' >"
%>
</td>
</tr>
</table>
</div>
</table>
</div>
</form>
</body>
</html>
Thanks all in advance
Here is an example:
I have a page called displayJustify.asp which has 7 form objects.
Each has a single record but one field called Specifications is intented to have multiple values.
As a result, you will have a result similar to this:
Userid
1
FullName
Pete Samprass
Address
122 samprass dr
Specifications yes No
'Samprass is a tennis player' yes
'Samprass is a 13 time wimbledon champion' yes
'Samprass won the us open in 2001' yes
As you can see from above example, there is only one userid
but there are 3 specifications entered for that userid.The total number of specifications could be less than 3 or more than 3.
I was wondering if there is a way to code this form to dynamically keep opening up new rows until all values for specifications and Yes/No field are displayed on the form.
I know I will have to add paging to navigate from page to page but that is critical right now.
Here is the page.
<html>
<head>
<title>Display Justifications</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body bgcolor="ffffff">
<%
set my_conn= Server.CreateObject("ADODB.Connection"
myDSN="DSN=justify"
'response.write mydsn
'response.end
my_Conn.Open myDSN
strsql ="SELECT * FROM tbl_persons, tbl_events WHERE tbl_persons.justifyID = tbl_events.eventID "
set rs = my_conn.Execute (StrSql)
'response.write("strsql"
'response.end
if rs.BOF or rs.EOF then ' No records found
response.write "Hmm... That didn't work.<br>There was an error. Oh well, try again.<a href=javascript:history.back();>back</a>"
response.end
end if
%>
<form name="display" method="post" action="displayjustification.asp">
<p><center><b>FC <BR>DPW</b></center></p>
<div align="center">
<table width="88%" border="1" bordercolor="000000">
<tr>
<td>
<div align="left">
<table><tr><td><b>TITLE: SPECIFICATION FOR A </b></td><td>
<%
Response.Write("<INPUT TYPE='TEXT' SIZE='40' NAME='txtSpecName' VALUE='" & rs("SpecName" & "' >"
%>
</td><td><b>OR EQUAL.</b></td></tr></table>
</div>
<div align="left">
<table>
<tr>
<td>
<p>
</td>
</tr>
<br><br>
<tr>
<td><b>
**NOTE**
</b></td>
</tr>
<tr>
<td>
<b>THE</b>
</td>
<td>
<%
Response.Write("<INPUT TYPE='TEXT' SIZE='40' NAME='txtOfferName' VALUE='" & rs("OfferName" & "' >"
%>
</td>
<td>
<b>OFFERED SHALL BE</b>
</td>
</tr>
</table>
</div>
<p>
<b>COMPARABLE WITH THE DETAILED REQUIREMENTS LISTED BELOW<br>
UNLESS OTHERWISE NOTED. ALL BIDDERS SHALL INDICATED EXACTLY<br>
WHAT THEY ARE OFFERING IN THE FOLLOWING BLANKS UNDER<br>
"BIDDERS RESPONSE". ALL EXCEMPTIONS TO NON COMPLYING<br>
DETAILED FEATURES MUST BE IDENTIFIED AND EXPLAINED
</b></p>
<div align="left">
<table>
<tr>
<td>
<b>MAKE & MODEL PROPOSED</b>
</td>
<td>
<%
Response.Write("<INPUT TYPE='TEXT' SIZE='40' NAME='txtMakeModel' VALUE='" & rs("MakeModel" & "' >"
%>
</td>
</tr>
<tr>
<td>
<b>ALTERNATE MAKE & MODEL PROPOSED</b>
</td>
<td>
<%
Response.Write("<INPUT TYPE='TEXT' SIZE='40' NAME='txtAlternateModel' VALUE='" & rs("AlternateModel" & "' >"
%>
</td>
</tr>
</table>
</div>
<br>
<div align="left">
<table>
<tr>
<td>
<font color="green"><b>* All Vendors Must Mark "Yes" or "No" To Comply With Each Individual Specification Below.</b></font>
</td>
</tr>
</table>
</div>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td>Specifications </td>
<td align="right">Yes</td>
<td align="right">No</td>
</tr>
<tr>
<td>
<%
Response.Write("<INPUT TYPE='TEXT' SIZE='80' NAME='txtItemDesc' VALUE='" & rs("ItemDesc" & "' >"
%>
</td>
<td>
<%
Response.Write("<INPUT TYPE='TEXT' SIZE='2' NAME='txtYes' VALUE='" & rs("TheYes" & "' >"
%>
</td>
<td>
<%
Response.Write("<INPUT TYPE='TEXT' SIZE='2' NAME='txtNo' VALUE='" & rs("TheNo" & "' >"
%>
</td>
</table>
</div>
<div align="left">
<table>
<tr>
<td>
<b>FOR ADDITIONAL INFORMATION PLEASE CONTACT</b>
</td>
</tr>
</table>
</div>
<div align="left">
<table>
<tr>
<td>
<%
Response.Write("<INPUT TYPE='TEXT' SIZE='28' NAME='txtContactName' VALUE='" & rs("ContactName" & "' >"
%>
</td>
<td>
<b>AT</b>
</td>
<td>
<%
Response.Write("<INPUT TYPE='TEXT' SIZE='28' NAME='txtContactEmail' VALUE='" & rs("ContactEmail" & "' >"
%>
</td>
</tr>
</table>
</div>
</table>
</div>
</form>
</body>
</html>
Thanks all in advance