Modal Windows in Opera (JavaScript)
Monday, 27. August 2007, 13:55:00
I know it's an IE / Mozilla steal but would be useful.
At the moment, Opera provides no way of showing a window modally. You have to just settle for a non modal window, as shown in this code:
function modalWin() {
if (window.showModalDialog) {
window.showModalDialog('popup.htm','_blank','dialogWidth:255px;dialogHeight:250px');
} else {
window.open('popup.htm','_blank', 'height=255,width=250,toolbar=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,modal=yes');
}
}I wonder if Opera would be interested in creating this function in Opera? It's definately something I'd find useful and it saves a lot of hassle working around Opera and Netscape. (If Opera supports it, that's good enough to ignore NS!)
This is no doubt first of many blog posts I will make under the "Opera wishlist" tag.
http://my.opera.com/leoalassia/blog/2008/08/07/showmodaldialog-for-opera
By leoalassia, # 7. August 2008, 23:01:07