Both IE and Firefox support "openModalWindow", so why don't you use that?
Main Topics
Browse All TopicsHi, everybody
I tried to use window.showModalDialog in my web application, but I found out that I can't customize it. I mean the attributes seem not to work. For example, if I set dialogWidth and dialogHeight, it keeps the default size.
(I'm using Vista and IE7, is this a known bug?)
Well... as far as I can't use it, I tried this JavaScript function as workaround:
function makeModal()
{
document.onfocusout = function()
{
window.focus();
}
}
this makes the popup becomes a "fake" modal window. The problem is when I open a second popup from the first one... the focus will stay on the first one, and I can't even click on the second one.
Could you please suggest me how to fix this workaround?
It seems easy but it's blowing my mind.
Thank you ~
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Hi Badotz,
I've never heard about an "openModalWindow" function in JavaScript. I also searched on the internet but I didn't find anything about it.
Maybe you're confused with "showModalDialog"?
Unfortunately, as I sad in my first post, I can't use showModaDialog because I'm not able to customize the window.
Arguments for "showModalDialog" must be lowercase:
https://developer.mozilla.
Well, actually it was not a matter of lowercase, but a syntax problem:
window.open("myPage.php","
window.showModalDialgo("my
I don't know why, but you must use ":" instead of "=" and "," instead of ";".
Thanks anyway for posting that link, at least I could find it out!
Business Accounts
Answer for Membership
by: aletheia1Posted on 2009-10-27 at 06:44:18ID: 25672297
I made a mistake in selecting the zones: I'm not using ASP. I would like a solution through JavaScript... thank you.