ScottInTexas
12-18-2002, 03:06 PM
In my ASP I am creating table. The table is written to an iframe on the calling web page. The problem is that I want the header row to stay in place in the recieving iframe and the rest of the table to scroll. My answer was to write the column headers to an iframe with no scrolling and the table to an iframe with scrolling and both these iframes written to the target.
I can't figure out how to build the big variable that will ultimately be the response.write bigBlock.
<%@ Language=VBScript %>
<% Option Explicit %>
<html>
<head>
<link rel="stylesheet" href="http://hydroenergy.intranet.dow.com/libcom/CSS/newstyle.css" type="text/css">
<title></title>
</head>
<body>
<IFRAME id='hdrFrame' marginwidth='0' scrolling='no' width='100%' height='20' frameborder='1'></IFRAME>
<IFRAME id='tblFrame' marginwidth='0' scrolling='auto' width='100%' height='100%' frameborder='1'></IFRAME>
<%
set up variable etc.
hdrDiv=hdrDiv & "<table border='1' width='100%' marginwidth='0' cellpadding='0' cellspacing='0'>"
hdrDiv=hdrDiv & "<CAPTION>" & rptTitle & "</CAPTION><tr>"
hdrDiv=hdrDiv & "<TD width='15%'>LPP#</TD>"
hdrDiv=hdrDiv & "<TD width='45%'>Comment</td>"
hdrDiv=hdrDiv & "<TD width='40%'>LPP Text</td>"
hdrDiv=hdrDiv & "</tr></table>"
bigBlock=hdrDiv & "<Script language='javascript'>hdrFrame.document.write(" & hdrDiv & ")</script>"
response.write bigBlock
%>
I left the table out of the code for brevity. It is built with a loop that loops through the rec set and fills each cell. This too is written to an iframe and the whole thing is written to the web page into a non-scrolling iframe.
Hope that is clear enough for someone to help.
I can't figure out how to build the big variable that will ultimately be the response.write bigBlock.
<%@ Language=VBScript %>
<% Option Explicit %>
<html>
<head>
<link rel="stylesheet" href="http://hydroenergy.intranet.dow.com/libcom/CSS/newstyle.css" type="text/css">
<title></title>
</head>
<body>
<IFRAME id='hdrFrame' marginwidth='0' scrolling='no' width='100%' height='20' frameborder='1'></IFRAME>
<IFRAME id='tblFrame' marginwidth='0' scrolling='auto' width='100%' height='100%' frameborder='1'></IFRAME>
<%
set up variable etc.
hdrDiv=hdrDiv & "<table border='1' width='100%' marginwidth='0' cellpadding='0' cellspacing='0'>"
hdrDiv=hdrDiv & "<CAPTION>" & rptTitle & "</CAPTION><tr>"
hdrDiv=hdrDiv & "<TD width='15%'>LPP#</TD>"
hdrDiv=hdrDiv & "<TD width='45%'>Comment</td>"
hdrDiv=hdrDiv & "<TD width='40%'>LPP Text</td>"
hdrDiv=hdrDiv & "</tr></table>"
bigBlock=hdrDiv & "<Script language='javascript'>hdrFrame.document.write(" & hdrDiv & ")</script>"
response.write bigBlock
%>
I left the table out of the code for brevity. It is built with a loop that loops through the rec set and fills each cell. This too is written to an iframe and the whole thing is written to the web page into a non-scrolling iframe.
Hope that is clear enough for someone to help.