Forum Moderators: open

Message Too Old, No Replies

Counting while sending

         

webboy1

1:35 pm on Feb 17, 2003 (gmt 0)

10+ Year Member



Hi,

I am trying to send out a mass email to the users in my datatbase. I have the script working fine so far.

However, i would like to count each email while the script is executing. So that i know how many have been sent so far.

I have a count on the script, but it only displays once the script is complete. I would prefer it to count on screen while the script is excecuting.

Basically what i have is <%no = 0%>, then just before the loop, i have: <%no = no + 1%>
Also before the loop i have <%reaponse.write(no)%>

This diplays a value for each email sent....i.e. i end up with a list of 1 - whatever down the screen.

I would like one number while excecuting, and i would like that one number to update i.e. one updated to 2 etc etc

Can i force the ASP to write something during script excecution?

Any ideas?

Brian

jpjones

1:38 pm on Feb 17, 2003 (gmt 0)

10+ Year Member



Make sure Buffering is turned on (response.buffer=true on the first line of your code), then Use:

Response.Flush

Every call to this will send the contents of the buffer to the browser.

Make sure you're not writing the output into a table, or some browsers still won't render the page until the table is closed.

HTH,
JP