Below is an example of how you can display hidden rows within a table and post a value back to the hidden row:
<%
'Query Strings
QsRowID = Request.QueryString("rid")
%>
<%
'Retrieve form value
SelVal=Request.Form("SelVal")
%>
<html>
<head>
</head>
<body>
<div align="center">
<table width="600" border="0" cellpadding="0" cellspacing="0">
<!--DWLayoutTable-->
<tr>
<td width="600" valign="top"><table width="100%" border="1" cellpadding="0" cellspacing="0">
<!--DWLayoutTable-->
<%
'clear row id
RowID=""
'Create records loop
for a = 0 to 45
'Create Unique row id for example
If RowID = "" then
RowID = 1
else
RowID = RowID + 1
End If
%>
<tr>
<td width="600" height="40" valign="middle">Record Row! <a href="example.asp?rid=<%=RowID%>"> Display hidden row below - <%=RowID%></a></td>
</tr>
<%
'Show Hidden row
If Trim(RowID) = Trim(QsRowID) then
%>
<form name="form" method="post" action="example.asp?rid=<%=RowID%>">
<tr>
<td height="40" valign="middle">
Hidden Row
<select name="SelVal">
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
</select>
<input type="submit" name="submit" value="submit">
<%
If Len(SelVal)>0 then
Response.Write "You selected " & SelVal
End If
%>
</td>
</tr>
</form>
<%
End If
%>
<%Next%>
</table></td>
</tr>
<tr>
<td height="560"> </td>
</tr>
</table>
</div>
</body>
</html>
I am working on some JavaScript to enable the page to navigate back to the row position and will post when working.
Hope the example was useful.
0 comments:
Post a Comment