CGI table print works great, except, unusual white spac
- Posted by John F Dutcher <John_Dutcher at urmc.rochester.edu> Aug 04, 2004
- 481 views
The script below does the expected except that the browser display skips about (2) screens of white space between the 'heading' line, (the <H1></H1> tags)..... and the start of the table 'header' print. The table 'detail' print follows immediately the table 'header' as expected. The <H1> tag is closed with its end tag ---> </H1> I've never seen such a thing; two screens of white space follow the HTML heading !!
#!c:\Euphoria\Bin\exw.exe include machine.e without warning crash_file("error-messages.txt") -- build html page: integer fn sequence line fn=open("bcare_remit.txt","r") if fn > 0 then line = gets(fn) else puts(1,"Unable to open the disk file\n") abort(1) end if puts(1, "Content-type: text/HTML\n\n" & "<html LANG=EN><head>" & "<title>BCH Remittance Splitter</title></head>" & "<body text=blue>" & "<center>" & "<H1>BCH Remittances for 7/28/04</H1>" & <-------- big space <-------- after this "<TABLE BORDER=1 BGCOLOR=pink>" & "<tr><th nowrap>Received Date</th>" & "<th nowrap>Provider</th>" & "<th nowrap>Svc Year</th>" & "<th nowrap>Account #</th>" & "<th nowrap>Last Name</th>" & "<th nowrap>First Name</th>" & "<th nowrap>Mid Init</th>" & "<th nowrap>Sub Last Name</th>" & "<th nowrap>Sub First Name</th>" & "<th nowrap>Sub Mid Init</th>" & "<th nowrap>Date of Birth</th>" & "<th nowrap>HIC Number</th>" & "<th nowrap>Location</th>" & "<th nowrap>Fin Class</th>" & "<th nowrap>Admit Date</th>" & "<th nowrap>Dschg Date</th>" & "<th nowrap>Pat Type</th>" & "<th nowrap>Omega Pat Type</th>" & "<th nowrap>TOB</th>" & "<th nowrap>Reference Number</th>" & "<th nowrap>Pymt Status</th>" & "<th nowrap>Rej Code</th>" & "<th nowrap>DRG</th>" & "<th nowrap>Total Charges</th>" & "<th nowrap>CAS Amount</th>" & "<th nowrap>Deductible Amt</th>" & "<th nowrap>Co-Ins Amount</th>" & "<th nowrap>Payment Amount</th>" & "<th nowrap>Pat ResP Amt</th>" & "</tr>" ) for i = 1 to 100 do puts(1, "<tr>" & "<td nowrap bgcolor=yellow>" & line[1..10] & "</td>" & "<td nowrap bgcolor=yellow>" & line[11..20] & "</td>" & "<td nowrap bgcolor=yellow>" & line[21..24] & "</td>" & "<td nowrap bgcolor=yellow>" & line[25..36] & "</td>" & "<td nowrap bgcolor=yellow>" & line[37..64] & "</td>" & "<td nowrap bgcolor=yellow>" & line[65..92] & "</td>" & "<td nowrap bgcolor=yellow>" & line[93..93] & "</td>" & "<td nowrap bgcolor=yellow>" & line[94..121] & "</td>" & "<td nowrap bgcolor=yellow>" & line[122..149] & "</td>" & "<td nowrap bgcolor=yellow>" & line[150..150] & "</td>" & "<td nowrap bgcolor=yellow>" & line[151..160] & "</td>" & "<td nowrap bgcolor=yellow>" & line[161..175] & "</td>" & "<td nowrap bgcolor=yellow>" & line[176..177] & "</td>" & "<td nowrap bgcolor=yellow>" & line[178..179] & "</td>" & "<td nowrap bgcolor=yellow>" & line[180..189] & "</td>" & "<td nowrap bgcolor=yellow>" & line[190..199] & "</td>" & "<td nowrap bgcolor=yellow>" & line[200..200] & "</td>" & "<td nowrap bgcolor=yellow>" & line[201..201] & "</td>" & "<td nowrap bgcolor=yellow>" & line[202..203] & "</td>" & "<td nowrap bgcolor=yellow>" & line[204..227] & "</td>" & "<td nowrap bgcolor=yellow>" & line[228..229] & "</td>" & "<td nowrap bgcolor=yellow>" & line[230..234] & "</td>" & "<td nowrap bgcolor=yellow>" & line[235..237] & "</td>" & "<td nowrap bgcolor=yellow>" & line[238..251] & "</td>" & "<td nowrap bgcolor=yellow>" & line[252..269] & "</td>" & "<td nowrap bgcolor=yellow>" & line[270..284] & "</td>" & "<td nowrap bgcolor=yellow>" & line[285..299] & "</td>" & "<td nowrap bgcolor=yellow>" & line[300..314] & "</td>" & "<td nowrap bgcolor=yellow>" & line[315..328] & "</td>" & "</tr>" ) puts (1,"<br>") line = gets(fn) end for puts(1,"</table></CENTER></body></html>")