×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

How to obtain a different table title on a continuation page ?

How to obtain a different table title on a continuation page ?

How to obtain a different table title on a continuation page ?

(OP)
The <th> tag defines a header cell in an html table.
Every time a continuation page of the table is printed, the same content of the header cell <th> is printed at the top of the page.
Question: how can the text of this header cell from the 2nd printed page differ from the 1st page?
The following attempt with IIF does not work.
Thanks for tips.

CODE -->

<body>
<table border="1">
<thead>
<tr>
<th width="25" align="right"><b><i>Nr.</i></b></td>
<th width="100" align="left"><b><i>

<%Response.Write IIf(PageBreak=true, "newName", "Name")%></b></td>

<th width="70" align="left"><b><i>Date</i></b></td>
</tr>
</thead> 

RE: How to obtain a different table title on a continuation page ?

How are you generating the code or is this just straight ASP with no back engine generating the code

RE: How to obtain a different table title on a continuation page ?

Describe the ways you generate the code

RE: How to obtain a different table title on a continuation page ?

(OP)
My not working test code.
Thanks for corrections.

CODE -->

<% @LANGUAGE="VBSCRIPT" %>
<%
'TEST
Function IIf(i,j,k)    
If i Then IIf = j Else IIf = k  
End Function

%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<style>
table, td, th {    
    border: 1px solid #ddd;
}

table {
    border-collapse: collapse;
}

th, td {
    padding: 3px;
}
</style>

</head>

<body id="page">
<p style="margin-top: 0; margin-bottom: 0"><font face="Verdana" size="2" color="blue"><b>
TEST</b></p>

<table border="1">
<thead>
	<tr>
 		<th width="25" align="right"><b><i>Nr.</i></font></b></td>
      		<th width="100" align="left"><b><i>
     
		<%Response.Write IIf(PageBreakafter=true, "newName", "Name")%></b></td>

		<th width="70" align="left"><b><i>Date</i></b></td>		
    	</tr>

</thead>


<%
Dim Conn, rs, sql
Set Conn = Server.CreateObject("ADODB.Connection")
Conn.Open "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("DBXYZ.mdb")
   
Set rs = Server.CreateObject("ADODB.Recordset")
sql = "SELECT * FROM TEST ORDER BY SfId DESC"
rs.Open sql, Conn

Do While Not rs.EOF
%>


	<tr>
      		<td width="25" align="right"><%=rs("SfId")%>&nbsp;</td>
     		<td width="100">&nbsp;<%=rs("Name")%></td>
		<td ...  </td> 
	</tr>

<%rs.moveNext
Loop%>

</table>
</body>
</html> 

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close