1. Euphoria 'For' loop alters HTML output at browser....
- Posted by John F Dutcher <John_Dutcher at urmc.rochester.edu> Aug 04, 2004
- 494 views
The Euphoria code below generates an HTML page (horizontally scrollable thanks to the knowledge of the forum readers). If I test by 'cutting off' the code after the first 'puts(1,...) which generates the table 'heading' cells (by adding the 'end' tags for the table, div, body and html at that point...the browser displays the 'heading line' and the table 'header' just as expected, with the table header directly underneath the 'heading'. As soon as the 'for i = 1 to 100 do' is added which formats the 'detail cells' of the table, two things happen: 1) The 'detail cells' are added immediately under their 'header cells' as expected, in a perfect table display 2) BUT the table in its entirety has been displaced in the browser display by two or more screen lengths (vertically) of white space from the original 'heading line' (<H1>...</H1>). It's as though the injection of Euphoria code needed to produce the detail 'data' affects the display from the 1st 'puts(1,..)' that produced the 'header' cells ???
#!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 style=\"color:Blue\">" & "<div style=\"text-align:center\">" & "<H2>BCH Remittances for 7/28/04</H2>" & "<table style=width:2000px; border=1; bgcolor=pink>" & "<tr>" & "<th>Received Date</th>" & "<th>Provider</th>" & "<th>Svc Year</th>" & "<th>Account #</th>" & "<th>Last Name</th>" & "<th>First Name</th>" & "<th>Mid Init</th>" & "<th>Sub Last Name</th>" & "<th>Sub First Name</th>" & "<th>Sub Mid Init</th>" & "<th>Date of Birth</th>" & "<th>HIC Number</th>" & "<th>Location</th>" & "<th>Fin Class</th>" & "<th>Admit Date</th>" & "<th>Dschg Date</th>" & "<th>Pat Type</th>" & "<th>Omega Pat Type</th>" & "<th>TOB</th>" & "<th>Reference Number</th>" & "<th>Pymt Status</th>" & "<th>Rej Code</th>" & "<th>DRG</th>" & "<th>Total Charges</th>" & "<th>CAS Amount</th>" & "<th>Deductible Amt</th>" & "<th>Co-Ins Amount</th>" & "<th>Payment Amount</th>" & "<th>Pat ResP Amt</th>" & "</tr>" ) <-------------- if I cut off here, no problem !! for i = 1 to 100 do <--------- when this is left in, the display <--------- above is actually affected puts(1, "<tr>" & "<td bgcolor=yellow>" & line[1..10] & "</td>" & "<td bgcolor=yellow>" & line[11..20] & "</td>" & "<td bgcolor=yellow>" & line[21..24] & "</td>" & "<td bgcolor=yellow>" & line[25..36] & "</td>" & "<td bgcolor=yellow>" & line[37..64] & "</td>" & "<td bgcolor=yellow>" & line[65..92] & "</td>" & "<td bgcolor=yellow>" & line[93..93] & "</td>" & "<td bgcolor=yellow>" & line[94..121] & "</td>" & "<td bgcolor=yellow>" & line[122..149] & "</td>" & "<td bgcolor=yellow>" & line[150..150] & "</td>" & "<td bgcolor=yellow>" & line[151..160] & "</td>" & "<td bgcolor=yellow>" & line[161..175] & "</td>" & "<td bgcolor=yellow>" & line[176..177] & "</td>" & "<td bgcolor=yellow>" & line[178..179] & "</td>" & "<td bgcolor=yellow>" & line[180..189] & "</td>" & "<td bgcolor=yellow>" & line[190..199] & "</td>" & "<td bgcolor=yellow>" & line[200..200] & "</td>" & "<td bgcolor=yellow>" & line[201..201] & "</td>" & "<td bgcolor=yellow>" & line[202..203] & "</td>" & "<td bgcolor=yellow>" & line[204..227] & "</td>" & "<td bgcolor=yellow>" & line[228..229] & "</td>" & "<td bgcolor=yellow>" & line[230..234] & "</td>" & "<td bgcolor=yellow>" & line[235..237] & "</td>" & "<td bgcolor=yellow>" & line[238..251] & "</td>" & "<td bgcolor=yellow>" & line[252..269] & "</td>" & "<td bgcolor=yellow>" & line[270..284] & "</td>" & "<td bgcolor=yellow>" & line[285..299] & "</td>" & "<td bgcolor=yellow>" & line[300..314] & "</td>" & "<td bgcolor=yellow>" & line[315..328] & "</td>" & "</tr>" ) line = gets(fn) end for puts(1,"</table></div></body></html>")
2. Re: Euphoria 'For' loop alters HTML output at browser....
- Posted by "Unkmar" <L3Euphoria at bellsouth.net> Aug 04, 2004
- 476 views
I don't know about fixing your problem but... ----- Original Message ----- From: "John F Dutcher" Sent: Wednesday, August 04, 2004 7:08 AM Subject: Euphoria 'For' loop alters HTML output at browser.... > > > posted by: John F Dutcher <John_Dutcher at urmc.rochester.edu> > > The Euphoria code below generates an HTML page (horizontally scrollable > thanks to the knowledge of the forum readers). > [...] > puts(1, > "Content-type: text/HTML\n\n" & > > "<html LANG=EN><head>" & > "<title>BCH Remittance Splitter</title></head>" & > "<body style=\"color:Blue\">" & > "<div style=\"text-align:center\">" & > "<H2>BCH Remittances for 7/28/04</H2>" & > "<table style=width:2000px; border=1; bgcolor=pink>" & > "<tr>" & > "<th>Received Date</th>" & [...] > "<th>Pat ResP Amt</th>" & > "</tr>" > ) <-------------- if I cut off here, no problem !! > > > for i = 1 to 100 do <--------- when this is left in, the display > <--------- above is actually affected > puts(1, > "<tr>" & Why not make the entire row yellow? <tr bgcolor="yellow"> And drop all the individual cells from being yellow. > "<td bgcolor=yellow>" & line[1..10] & "</td>" & > "<td bgcolor=yellow>" & line[11..20] & "</td>" & > "<td bgcolor=yellow>" & line[21..24] & "</td>" & [...] > "<td bgcolor=yellow>" & line[300..314] & "</td>" & > "<td bgcolor=yellow>" & line[315..328] & "</td>" & > "</tr>" > ) > > line = gets(fn) > end for > puts(1,"</table></div></body></html>") > </eucode> {{{ > unkmar
3. Re: Euphoria 'For' loop alters HTML output at browser....
- Posted by Philip Deets <philip1987 at hotmail.com> Aug 04, 2004
- 449 views
Here's what I made. It works fine for me. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> <html lang="en" xmlns="http://www.w3.org/1999/xhtml" > <head> <style type="text/css"> td { background-color:Yellow; } </style> <title>BCH Remittance Splitter</title> </head> <body style="color:Blue"> <h2 style="text-align:center">BCH Remittances for 7/28/04</h2> <table style="width:2000px; border:1; background-color:#ffaaaa"> <tr> <th>Received Date</th> <th>Provider</th> <th>Svc Year</th> <th>Account #</th> <th>Last Name</th> <th>First Name</th> <th>Mid Init</th> <th>Sub Last Name</th> <th>Sub First Name</th> <th>Sub Mid Init</th> <th>Date of Birth</th> <th>HIC Number</th> <th>Location</th> <th>Fin Class</th> <th>Admit Date</th> <th>Dschg Date</th> <th>Pat Type</th> <th>Omega Pat Type</th> <th>TOB</th> <th>Reference Number</th> <th>Pymt Status</th> <th>Rej Code</th> <th>DRG</th> <th>Total Charges</th> <th>CAS Amount</th> <th>Deductible Amt</th> <th>Co-Ins Amount</th> <th>Payment Amount</th> <th>Pat ResP Amt</th> </tr> <tr> <td>data data</td> <td>data data</td> <td>data data</td> <td>data data</td> <td>data data</td> <td>data data</td> <td>data data</td> <td>data data</td> <td>data data</td> <td>data data</td> <td>data data</td> <td>data data</td> <td>data data</td> <td>data data</td> <td>data data</td> <td>data data</td> <td>data data</td> <td>data data</td> <td>data data</td> <td>data data</td> <td>data data</td> <td>data data</td> <td>data data</td> <td>data data</td> <td>data data</td> <td>data data</td> <td>data data</td> <td>data data</td> <td>data data</td> </tr> </table> </body> </html>
4. Re: Euphoria 'For' loop alters HTML output at browser....
- Posted by Philip Deets <philip1987 at hotmail.com> Aug 04, 2004
- 475 views
Philip Deets wrote: > > Here's what I made. It works fine for me. > > <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "<a > href="http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd</a>"> > <html lang="en" xmlns="<a > href="http://www.w3.org/1999/xhtml">http://www.w3.org/1999/xhtml</a>" > > <head> > <style type="text/css"> > td > { > background-color:Yellow; > } > </style> > <title>BCH Remittance Splitter</title> > </head> > <body style="color:Blue"> > <h2 style="text-align:center">BCH Remittances for 7/28/04</h2> > > <table style="width:2000px; border:1; background-color:#ffaaaa"> > <tr> > <th>Received Date</th> > <th>Provider</th> > <th>Svc Year</th> > <th>Account #</th> > <th>Last Name</th> > <th>First Name</th> > <th>Mid Init</th> > <th>Sub Last Name</th> > <th>Sub First Name</th> > <th>Sub Mid Init</th> > <th>Date of Birth</th> > <th>HIC Number</th> > <th>Location</th> > <th>Fin Class</th> > <th>Admit Date</th> > <th>Dschg Date</th> > <th>Pat Type</th> > <th>Omega Pat Type</th> > <th>TOB</th> > <th>Reference Number</th> > <th>Pymt Status</th> > <th>Rej Code</th> > <th>DRG</th> > <th>Total Charges</th> > <th>CAS Amount</th> > <th>Deductible Amt</th> > <th>Co-Ins Amount</th> > <th>Payment Amount</th> > <th>Pat ResP Amt</th> > </tr> > <tr> > <td>data data</td> > <td>data data</td> > <td>data data</td> > <td>data data</td> > <td>data data</td> > <td>data data</td> > <td>data data</td> > <td>data data</td> > <td>data data</td> > <td>data data</td> > <td>data data</td> > <td>data data</td> > <td>data data</td> > <td>data data</td> > <td>data data</td> > <td>data data</td> > <td>data data</td> > <td>data data</td> > <td>data data</td> > <td>data data</td> > <td>data data</td> > <td>data data</td> > <td>data data</td> > <td>data data</td> > <td>data data</td> > <td>data data</td> > <td>data data</td> > <td>data data</td> > <td>data data</td> > </tr> > </table> > </body> > </html> > That was supposed to start with <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" " on the first line and start with <html lang="en" xmlns=" on the second line. It got screwed up when I posted it. Phil
5. Re: Euphoria 'For' loop alters HTML output at browser....
- Posted by irv mullins <irvm at ellijay.com> Aug 04, 2004
- 494 views
John F Dutcher wrote: > > The Euphoria code below generates an HTML page (horizontally scrollable > thanks to the knowledge of the forum readers). > > If I test by 'cutting off' the code after the first 'puts(1,...) which > generates the table 'heading' cells (by adding the 'end' tags for the table, > div, body > > and html at that point...the browser displays the 'heading line' and the > table 'header' just as expected, with the table header directly underneath > the 'heading'. > > As soon as the 'for i = 1 to 100 do' is added which formats the 'detail > cells' of the table, two things happen: > 1) The 'detail cells' are added immediately under their 'header cells' > as expected, in a perfect table display > 2) BUT the table in its entirety has been displaced in the browser > display by two or more screen lengths (vertically) of white space > from the original 'heading line' (<H1>...</H1>). > > It's as though the injection of Euphoria code needed to produce the > detail 'data' affects the display from the 1st 'puts(1,..)' that > produced the 'header' cells ??? Looks fine to me. There's only the expected amount of space between the heading and the table. Let me suggest that you use your browser's "view source" to capture the output html, and then look at that html. You may be able to spot something there. Irv
6. Re: Euphoria 'For' loop alters HTML output at browser....
- Posted by John F Dutcher <John_Dutcher at urmc.rochester.edu> Aug 04, 2004
- 477 views
As God is my witness...after making a 'static page' from your example .... it displayed perfectly as you suggested, and as I expected...since there was no Euphoria involved. I then went to run my script on my server to pick up the reason why a 'Euporia generated' page did not behave the same way ....when low and behold, for the first time ever, it did !! I'm completely baffled....but basically your original style changes made a clean approach to holding width....why none of my many other re-runs after including them produced the proper output following the heading....I don't know. I just note that it does now. Thanks, John D.
7. Re: Euphoria 'For' loop alters HTML output at browser....
- Posted by irv mullins <irvm at ellijay.com> Aug 04, 2004
- 507 views
John F Dutcher wrote: > > As God is my witness...after making a 'static page' > from your example .... it displayed perfectly as you suggested, and > as I expected...since there was no Euphoria involved. > > I then went to run my script on my server to pick up the reason why > a 'Euporia generated' page did not behave the same way ....when > low and behold, for the first time ever, it did !! > > I'm completely baffled....but basically your original style changes > made a clean approach to holding width....why none of my many > other re-runs after including them produced the proper output following > the heading....I don't know. > > I just note that it does now. Euphoria is no different than Perl, Python, Ruby, C, or any other programming language which may be used as a CGI program to create html pages. The output in all cases is just ascii characters. There's no mumbo-jumbo or secret incantation needed. If things don't come out the way you were expecting, the answer is the same as it always is: check your code, check your setup, and be sure you are actually running the program you think you are running. Compare the outputs (both good and bad), and you will see a difference. Guaranteed. Irv