Subj : Re: About JS_SuspendRequest To : Jun Kim From : Digital Man Date : Wed Dec 08 2004 03:16 pm Re: Re: About JS_SuspendRequest By: Jun Kim to netscape.public.mozilla.jseng on Wed Dec 08 2004 01:50 am > > > hi. ama-grammer(amatuer programmer, 'cuz I sure am not a PRO) again. > > > :) > > > > > > I'm trying to implement alert() function. > > > But the platform does not provide modal dialog. (in mobile platform) > > > So I can't simply create a dialog and do "doModal()". > > > since it's modaless, it returns right after creating and opening a > > > dialog, so I can't seem to hold the script running. > > > I need someway to halt the script, and continue later on from where > > > it stopped. > > > > Your alert() function can just poll the message box until it's closed. > > Like I said, there's no Modal dialog(message box). > Which means, it returns right after the message box window has been opened. > So if i open up a message box, it returns right away and go on with the > rest of the script. That's the problem that I have. Do your message/dialog box have some kind of handle that you can poll for its status (visible or closed or whatever)? Is it possibl you could have the dialog signal a semaphore when it is closed (a FormClose callback or some such), and have your alert() function block on that semaphore? There's got to be way... digital man Snapple "Real Fact" #166: Before mercury, brandy was used to fill thermometers. .