Balaji M wrote:
Is there any way to create a modal dialog in the html, which should work
in both ie and netscape.
the one window.showmodaldialog works well in ie, but not in netscape
i found a way to keep the window to setfocus like this
<script>
function SetFocusOnMe () {
this.SetFocus ();
If you do this in Firefox, you get a message saying:
Error: this.SetFocus is not a function
Source File:
...
Line: 8
which is pretty self explanatory - SetFocus is not defined
anywhere as a JavaScript function.
setTimeout("SetFocusOnMe()", 50);
}
</script>
</head>
<body onLoad="javascript:setTimeout('SetFocusOnMe()', 50)">
No need for "javascript:".
So you call setTimeout every 50 ms from here, then again every
50ms from inside the function - cool.
but this gives javascript error
Even if it didn't, and it's trivial to fix, what's the point?
The user can simply close your "modal" window. Or if they have
Firefox (and maybe a number of other browsers), prevent you from
setting focus on it at all.
And if they have scripting disabled, your narcissistic 'dialog'
will not be able to be an attention hog at all. What purpose
does a modal dialog have in the context of a web browser?
--
Fred.