Thursday, July 19, 2007

Learn something new everyday...

Apparently IE has a modal option for JavaScript to launch new windows.

I can't see it being truly useful though, as it's not supported in Firefox or Opera.

Anyway, the functionality in JavaScript looks like this:

Function modalWin() {
if (window.showModalDialog) {

window.showModalDialog("xpopupex.htm","name", "dialogWidth:255px; dialogHeight:250px");

} else {

window.open('xpopupex.htm','name', 'height=255,width=250, toolbar=no,directories=no,status=no, menubar=no,scrollbars=no, resizable=no ,modal=yes');

}}

As I said, I'm not 100% certain what the usefulness of this is, as if I want something modal, then that means I need it modal in Firefox and Opera as well as in IE.

No comments:

Blog Widget by LinkWithin