Rexolio
Technical User
- Aug 29, 2001
- 230
I'm trying to create online mailing labels via ASP with info pulled from a SQL database. I can get it lined up okay in IE, but not Netscape or AOL using the same template. But even I create 3 different templates for each browser type, they eventually get cut off by the printer. Found an article in 4GuysFromRolla.com about create Printer line breaks, but can't get it to work. It adds to the confusion because I'm fairly unfamiliar with the script that I have which makes the looped info go 3 columns across and then start a new row. Here is what I have:
<table border="0" width="775" cellspacing="0" cellpadding="0">
<tr>
<%
i = 1
do until rsResults.eof
cellString = "<td width='260'>" & rsResults("FirstName" & " " & rsResults("LastName" & "</font></td>"
if not i mod 3 = 0 then
response.write(cellString)
else
response.write(cellString)%></tr><tr>
<%
end if
i = i + 1
rsResults.movenext
loop
%>
</tr>
</table>
<%
end if
rsResults.close
%>
Here is what I found:
<HEAD>
<STYLE>
H3 { page-break-before: always }
</STYLE>
</HEAD>
<%
For i = 0 To UBound(myArray)
Response.write "<IMG Src='" & myArray(i) & "'><BR>"
If i % 4 = 0 Then
' If i is evenly divisible by 4, meaning every
' 4th image, we want to insert a page break
Response.write "<H3>Start the next page</H3>"
End If
Next
%>
Any tips on putting this together or suggestions on another way. And I'd rather not have to use <H3></H3> tags on top o fit all! Sorry to put such a long message in here, but I'm totally desparate!!! %-(
<table border="0" width="775" cellspacing="0" cellpadding="0">
<tr>
<%
i = 1
do until rsResults.eof
cellString = "<td width='260'>" & rsResults("FirstName" & " " & rsResults("LastName" & "</font></td>"
if not i mod 3 = 0 then
response.write(cellString)
else
response.write(cellString)%></tr><tr>
<%
end if
i = i + 1
rsResults.movenext
loop
%>
</tr>
</table>
<%
end if
rsResults.close
%>
Here is what I found:
<HEAD>
<STYLE>
H3 { page-break-before: always }
</STYLE>
</HEAD>
<%
For i = 0 To UBound(myArray)
Response.write "<IMG Src='" & myArray(i) & "'><BR>"
If i % 4 = 0 Then
' If i is evenly divisible by 4, meaning every
' 4th image, we want to insert a page break
Response.write "<H3>Start the next page</H3>"
End If
Next
%>
Any tips on putting this together or suggestions on another way. And I'd rather not have to use <H3></H3> tags on top o fit all! Sorry to put such a long message in here, but I'm totally desparate!!! %-(