If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Enjoy an ad free experience by logging in. Not a member yet? Register.

How to update graphics dynamically?

I have a scenario here:
I will list out a whole list of records which user will do selection and updating (without saving to DB yet..) Then user will click the submit button.

In my Submit_onClick, I will loop through each records in the listing and perform some processing. This will take some time.

The question here is how do I update the web page dynamically, while I am processing the list of records.. I thought of using some Javascript to do the printout of processing statements.. but how can I call a Javascript function without finishing my process?

Re: How to update graphics dynamically?

Originally posted by alexccw In my Submit_onClick, I will loop through each records in the listing and perform some processing. This will take some time.

I realise that your problem is solved, but I am intrigued at why your script/processing would so long as to actually need to report its progress to the user... I feel that you may be treating the symptom rather than the cause!

What exactly is it doing? Are you sure you've optimized the processing as much as you can?

Replies

Hi,

My process include updating the lists of records that is listed in the datagrid.. while sending emails to each of the record holders. As sending emails and updating records could took some time and if there are more that 10 records, the time could takes up to 1 minute or so.. thus I need this piece of codes to keep my user known to the progress made so far.

Of course, I am in the midst of finding some better way of doing the updating and sending the mail.

How exactly are you sending the emails? You should be sending them asynchronously (i.e. they are sent as part of a background task instead of holding up the script as each one is sent), which is easily done with an external/relay mail server (e.g. Microsoft Exchange) or a sophisticated email component.

Doing it this way would make the script execute virtually instantly, leaving the mail server to work its way through the queue in its own time...

However, I don't see why you need custom components at all (unless they offer special features you need) - if you use the standard CDONTS or CDOSYS components in conjunction with your ISP's server (as a relay), the emails will be sent asychronously automatically.

Then again, from what you've said this should be happening with your current setup already, so I can only assume that your SMTP component is NOT sending via your ISP's mail server, and is instead sending each one directly (hence the delays)...