Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Is it possible to run multiple processes at the same time?

Status
Not open for further replies.

MikeBronner

Programmer
May 9, 2001
756
US
My goal is to have an asp script that will simultaneously send an email, and at the same time continue processing the script. I want to eliviate the wait-time that the user experiences when sending emails from a script.

Is this possible? Thanks! Take Care,
Mike
 
I think you'd have to "hack" it in this case, as ASP is not multi-threaded. MMMMMMM.... multi-thread.

Ahem. Excuse me. ;-)

I think you could fake it pretty well here by having another page do the emailing, and then just popping that page in a popup, and closing it when it's done.

To avoid the window popping up in your users' faces, you'll need to take the focus away from it, though.

function doEmail(){
var url = 'emailIt.asp';
var x = window.open(url,'emailWin');
window.focus();
}

so that the function fires off the popup, immediately takes focus back to itself, and then that window can do it's thing, and then close itself.

Granted, not an ideal solution, but one that I think could work quite well.

Store any vars you'd need to stick in that email in session variables prior to opening the window, and then just grab them back up on your email page.

Haven't had much chance to study up on .NET, but I know my fingers are crossed for multi-thread.

good luck! :)
paul
penny.gif
penny.gif
 
Mike,

I wrote a FAQ on how to present a user with a loading message that might serve to illustrate what I'm talking about there.

faq333-1419

Basically, it pops a window when the page first loads (before any processing), and that starts up a javascript in that window that just does it's little loop-tee-do adding dots to a <span> and when the page is finished, it closes that window.

Now technically, that is more or less, a hacked &quot;multi-thread&quot; solution, and will maybe clarify what I was talking about there.

hope it helps.
penny.gif
penny.gif
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top