RobG wrote:
Gérard Talbot wrote about "modal" as the 3rd argument to window.open:
"modal: (...) The MSIE 6 equivalent to this feature is the
showModalDialog() method."
http://developer.mozilla.org/en/docs...ality_features
Hey, 'modal' works in IE 6 too.
Thanks for this great tip Rob and Gérard. This is really useful since
Microsoft has crippled the old showModalDialog (specifically, you can't
functionally open it without another hit to the browser, which is
wasteful. By this I mean that you can't open it using
"javascript
:'<html><head>...'" and have it return anything), and the
only way I could get its functionality, even when I am gerrymandering
IE on my own Win XP Pro, SP 2 system is to use the Win API
showHTMLDialog. See, for example:
http://groups.google.com/group/micro...ee1d91140bc6a/
However, it seems that there is at least a small bug in the IE 6
implementation. It seems like where the margin of the body of the
modal window is, The borders in the example below do not render quite
correctly: there is about a 2 pixel swath that is painted according to
the window that is underneath. Oops.
Csaba Gabor from Vienna
<button onclick="dome()" accesskey=d><u>D</u>o me
<script type='text/javascript'>
function dome() {
var newWin = window.open("about
:blank",null,"modal");
newWin.document.open();
newWin.document.write("<body>Some text</body>");
newWin.document.close();
newWin.document.title = "My favorite title";
}
</script>