This is a coding approach issue, rather than a modal window issue. To me at least.

When I needed behavior like this, I wrote my code in such a way that a function was called that set up the environment and then opened the modal window. Now that the modal window is open, I know that nothing else should be receiving events, so there is no code to execute other than for the modal stuff specifically. Now when the window is closed, I call the appropriate function (cancel, save, etc) and continue processing from there. In this way, my processing has "stopped" until the Modal window triggers the next part of processing.

Of course, this is not the answer for all cases. But, working in an asynchronous and event driven environment, this tends to work well enough.

To acheive what you are asking for would be possible if you were working in a synchronous or procedural environment. But that doesn't describe a web page per se....

My thoughts...

Shawn

Richard D. Worth wrote:
What I mean to say is, a modal isn't about stopping flow of code. It's about restricting interaction to a certain set of elements, until the interaction is complete. So it allows interaction with elements in that modal (requiring code flow - remember javascript is single-threaded), preventing interaction with all others, until it's closed.

If you're wanting to call a modal like a function and have it return a value (think confirmation dialog), it won't work to block like that. An alternative pattern is to provide a callback function that will resume execution after the modal is closed.

- Richard

On Fri, Nov 14, 2008 at 4:48 PM, Eric Martin <[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>> wrote:


    I guess it depends on what you mean by "flow of code must STOP".

    On Nov 14, 12:11 pm, Wagner <[EMAIL PROTECTED]
    <mailto:[EMAIL PROTECTED]>> wrote:
     > Is it possible to make a window like jqModal, etc, etc,  BUT WITH A
     > REAL MODAL way of work?
     >
     > I mean.... the flow of code must STOP until the window be closed!
    Does
     > it exist?


Reply via email to