Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!news-1.dfn.de!news.dfn.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: "Mel Smith" Newsgroups: comp.lang.javascript Subject: Suspending the flow of JS/ES execution Date: Thu, 12 Sep 2013 13:53:15 -0600 Lines: 28 Message-ID: X-Trace: individual.net iRRUKiIlJ8+fuydP8PXMDgQuPCONOMuBapuxaINjNrkt9EJNfo Cancel-Lock: sha1:Cr4EfArlCLaD+aeCUcP5F/2rHgE= X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.5931 X-RFC2646: Format=Flowed; Original X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157 Xref: csiph.com comp.lang.javascript:21302 Hi: I have the following JS/ES code: function somefunc() { // next line does a lot of work MyNewAlert(cmsg) ; // I want to stop execution here *until* // my new alert function has finihed its work and returned // that is, do not execute the next function until everrything // is completed up to here someobj.focus() ; return ; } Hope someone can tell me what to do to suspend the flow of JS/ES execution until my new function is completed. Thanks for some guidance on this. -- Mel Smith