You can accomplish essentially the same thing on Netscape, but you have to do a few tricks with window.open() and Javascript to emulate the showmodalDialog function.
How do you do this ryc? A modal is a very difficult thing to fake (it stops the current thread of execution I think.)<br><br><br><A HREF="mailto:jared@aauser.com">jared@aauser.com</A>
It would take a bit of work to emulate stopping the current thread of execution, but with Javascript, that's hardly ever a serious concern. Mainly what you want is a function that pops up a set of controls for the user to make choices, and then returns a value or array of values upon which to continue execution. <br><br>The IE showModaldialog() is just an HTML page wrapped in a dialog, with the nifty feature of being able to do:<br><br>window.returnValue=foo;<br>window.close();<br><br>It also prevents the user from doing anything else until the dialog is dealt with.<br><br>In Netscape, you would have to accomplish that with some trickery. In the <body> of the popup window you could do onblur="this.focus()" to return the focus to the popup until it is closed. (I believe this will do the trick, but if not, let me know)<br><br>Secondly, rather than being able to set window.returnValue, you would just do something like<br><br>top.opener.my_returnvaluefunction(foo);<br>//where foo is your 'return' value<br>window.close();<br><br>So essentially, with IE, you can have one function, which is halted in the middle to make user choices. In Netscape, you would have two functions; one to set up the modal dialog, and the second to continue the stream of execution.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.