I’m doing some ASP classic work for a client. I’m well versed at Cold Fusion and there is a CF tag called cfflush that allows large amounts of data to be outputed to the browser as it becomes available.
Is there a similar tag in ASP Classic? I’m processing close to a thousand rows of data and I need the progress to update in real time in the browser window.
Thanks DB. That should have been obvious to me. However, I just tried it with 500 rows and it still waited to output until the entire process was completed.
This is my first try at trying to make this look like it’s a real dynamic page. What I would like to do is load the html for the page and then dynamically add the rows to the table as they are processed. I’ve been looking for some sort of code(perhaps javascript?) that would allow me to do this, but I haven’t had any luck as of now.
The reason you don’t see the page being built is most likely because it’s one large table, and the browser is waiting for the tag before being able to render it.
Yes, I read that. I’ve been looking for some sort of solution.
I read that I could use javascript to enter new rows in an existing table while the data is being processed. I’m just trying to figure out how to call the javascript while in the middle of the FOR NEXT.
Would it work if I just used DIVS instead of tables? The only reason I was using tables is because I need to get this done fairly quickly.
I’ll keep looking for the solution. If you have any thoughts, I’d love to hear them.
Now, what I would like to do is write the header and the footer of the html document and then fill the center DIV with the output as if it were an inner screen.
As of now I’m writing the header and then a few minutes of data flushing and then the footer.
I’m guessing I will have to use JS for this unless any of you fellas have a better idea.
as the script is processed from top to bottom and the footer is at the bottom, this will have to be done on the client side. most likely with for example javascript. I don’t know how to do it, but I think this is the way it has to be done..
Thank you riley for pointing out that didn’t think about it
[QUOTE=SubSpace]
The reason you don’t see the page being built is most likely because it’s one large table, and the browser is waiting for the tag before being able to render it.
[/QUOTE]
If this is the case, simply display each row as it’s own table so that the “table” is really a series of tables. Set each cell within each table to the same width so that all the cells line up.
Thanks again. I thought about using multiple tables but I want to display the footer before the flush.
I’ve got it working now. I’m writing the header, a container DIV, and the footer. Then I’m processing the data and updating the innerhtml property of the DIV using Javascript. It’s almost working well so far.
Here is the function (please bare with me, it’s a cut and paste job):
Here is the ASP code I’m using to call the function:
So, this is working almost perfectly. The problem…It replaces the entire innerHTML content every time so the screen flashes for every row I process. Is there a way in Javascript to just append to the innerhtml rather than replace?
The only other task I would like to accomplish with this is to keep the focus at the bottom of the scrolled DIV while the rows are being added.
Thanks a lot for all your ideas. I’m still looking for a bit more, if you’re able to.