473,414 Members | 1,737 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,414 software developers and data experts.

FLUSHing out put mid-table in IE

CJM
I have quite a large report, which takes a couple of minutes to run. I'd
like to show line-by-line updates as they become available, but since I'm
using IE6, Response.Flush() doesnt work.

I know that I could break the table up into a series of smaller tables, but
I prefer not to do this unless I have to - are there any other alternatives
for flushing rows of a table?

Thanks

Chris
Feb 13 '06 #1
8 3691
CJM wrote:
I have quite a large report, which takes a couple of minutes to run.
I'd like to show line-by-line updates as they become available, but
since I'm using IE6, Response.Flush() doesnt work.
What does the browser have to do with it?
I know that I could break the table up into a series of smaller
tables, but I prefer not to do this unless I have to - are there any
other alternatives for flushing rows of a table?

I have no trouble using Response.flush with an IE6 client.

One gotcha is that some minimum number of characters (I forget how many)
needs to be in response before the first fluxh can occur. Here is an example
that works fine in my IE6 browser:

<%
Response.Buffer=true
dim t,i,j
'build initial response to allow subsequent flushes to occur
for j = 0 to 25
Response.Write "1"
next
Response.Write "<BR>"
Response.Flush

for j = 0 to 2
'simulate long-running task (not recommended)
t=now
do until datediff("s",t,now)>=2
i=i+1
loop
Response.Write i & "<BR>"
Response.Flush
next
%>

Bob Barrows
--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.
Feb 13 '06 #2
CJM

"Bob Barrows [MVP]" <re******@NOyahoo.SPAMcom> wrote in message
news:uP*************@TK2MSFTNGP10.phx.gbl...

What does the browser have to do with it?


Quite a lot apparently... I have read that the result produced by
Response.Flush() vary according to browser, and have subsequently proved the
same myself.

I have a report that generates a table that is 45-50 columns wide, and 200
rows long... and it takes some time to produce. Inserting a Response.Flush
in the code flushes the output to the client, but what happens then is
dependant on the browser. E.g. FF1.5.1 renders each row line by line (as
expected) but IE6 doesnt (until the closing </table> tag is generated). If
you rt-click/View Source during this period, the source indicated that the
browser is receiving the FLUSHed output from the server, but IE6 is not
rendering it.

I have no trouble using Response.flush with an IE6 client.

One gotcha is that some minimum number of characters (I forget how many)
needs to be in response before the first fluxh can occur. Here is an
example
that works fine in my IE6 browser:


I'm asking it to flush after each line, which means the buffer will have
several hundred characters in it each time, as a minimum. I assume this is
greater than the minimum required?

Thanks for the prompt response anyway Bob. Any further ideas?

Feb 13 '06 #3
CJM wrote:
I know that I could break the table up into a series of smaller
tables, but I prefer not to do this unless I have to - are there
any other alternatives for flushing rows of a table?


"flushing" is the wrong word. When you use Response.Flush(), IE actually
receives the content. You want to force the browser to render a table before
it encounters </table>. I know of no way to do that. In any case, IE is
under no obligation to do so.

--
Dave Anderson

Unsolicited commercial email will be read at a cost of $500 per message. Use
of this email address implies consent to these terms. Please do not contact
me directly or ask me to contact you directly for assistance. If your
question is worth asking, it's worth posting.
Feb 13 '06 #4
CJM wrote:
"Bob Barrows [MVP]" <re******@NOyahoo.SPAMcom> wrote in message
news:uP*************@TK2MSFTNGP10.phx.gbl...

What does the browser have to do with it?


Quite a lot apparently... I have read that the result produced by
Response.Flush() vary according to browser, and have subsequently
proved the same myself.

I have a report that generates a table that is 45-50 columns wide,

Ah! I missed that operative word in your OP. Yes, IE refuses to "buffer" a
table element.

One way around this is via client-side code:
<%
Response.Buffer=true
%>
<html>
<head>
<script type="text/javascript">
function addRow(data)
{
var tblbody=document.getElementById("tblData").tBodies (0)
var newRow=tblbody.insertRow()
var newCell=newRow.insertCell()
newCell.innerText=data
}
</script>
</head>
<body>
<table id="tblData">
<thead>
<tr><th>Heading</th></tr>
</thead>
<tbody></tbody>
</table>
</body></html>
<%
dim t,i,j
Response.Flush

for j = 0 to 2
'simulate long-running task (not recommended)
t=now
do until datediff("s",t,now)>=2
i=i+1
loop
Response.Write "<script type=""text/javascript"">" & _
"addRow('" & i & "');</script>"
Response.Flush
next
%>

--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.
Feb 13 '06 #5
CJM

"Dave Anderson" <GT**********@spammotel.com> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...

"flushing" is the wrong word. When you use Response.Flush(), IE actually
receives the content.
Yeah, I'd agree with that.
You want to force the browser to render a table before it encounters
</table>. I know of no way to do that.
That is what I feared.
In any case, IE is under no obligation to do so.


IE is under few obligations to do anything useful! :)
Never mind...

Chris
Feb 13 '06 #6
Bob Barrows [MVP] wrote:
I have a report that generates a table that is 45-50 columns wide,

Ah! I missed that operative word in your OP. Yes, IE refuses to
"buffer" a table element.

Bad wording. I should have said "IE insists on buffering table elements".
--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.
Feb 13 '06 #7
CJM

"Bob Barrows [MVP]" <re******@NOyahoo.SPAMcom> wrote in message
news:uF**************@TK2MSFTNGP10.phx.gbl...
Bob Barrows [MVP] wrote:
I have a report that generates a table that is 45-50 columns wide,

Ah! I missed that operative word in your OP. Yes, IE refuses to
"buffer" a table element.

Bad wording. I should have said "IE insists on buffering table elements".
--


No probs - I understood what you meant.

Rather than use an JS workarounds, I think I'll just accept the status quo.
Besides, I'm working on making the report smaller/quicker to run...

Thanks
Feb 14 '06 #8
CJM wrote:
. Besides, I'm working on making the report smaller/quicker
to run...

That does sound like the better plan ...

--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"
Feb 14 '06 #9

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Graham Ashton | last post by:
Hi. I'm having trouble flushing sys.stdout. I've written a small example to illustrate my problem (see below). In short, I expect it to ping "received hello", sleep for 5 seconds and then print...
6
by: Farshid Lashkari | last post by:
Hi, My application has python embedded into it. I noticed that when I run any python code the output is buffered and doesn't get flushed until my application exits. To fix this I simply flush...
3
by: gf gf | last post by:
Is there any way to make Python's print() flush automatically, similar to...mmm...that other language's $|=1 ? If not, how can I flush it manually? sys.stdout.flush() didn't seem to work. ...
10
by: Ken VdB | last post by:
Hi everyone, Is there a reason why the Mid() function only works in one direction in VBScript? This code works in VB6 but not in VBScript? Is there a way around it? I am trying to create an...
6
by: Nawab | last post by:
Hey can anyone explain to me the difference between Mid and Mid$ ....i notice sometimes when i a running the update query with Mid$ it tells me that for example 3 records will be updated ( which in...
3
by: Eric | last post by:
Good afternoon, Can anyone help me with flushing the buffer in ASP.NET. I have a set of functions that perform a series of maintainence operations. As these functions are called sequentially,...
6
by: tegdim | last post by:
Hello, I'm trying to send a string to a subprocesses' output stream in my java program. I'm writing the data to the stream and then trying to flush the stream. This, however , isn't actually...
2
by: avlee | last post by:
Hello I want to make two kind of windows: 1. Poping up - such window will appear in front of the other windows (receive focus). 2. Flushing - such window will not appear in front of the others...
5
by: arnuld | last post by:
this is from mentioned section. i did not understand some things here: it means "flushing the buffer" and "writing to output device" are SAME thing, these are just 2 different names for the...
0
by: theJade | last post by:
I'm currently running Python 2.5 on Windows 2003. I'm not sure if this is strictly a python issue but I was wondering if anyone has seen and/or knows how to fix this problem. From a linux...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.