By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,426 Members | 3,118 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,426 IT Pros & Developers. It's quick & easy.

Why doesn't modal=1 or modal=yes work in FireFox?

P: n/a
Hi all...

I am bulding an application and wish to use custom Modal dialog windows.
According to a couple of recent articles I have seen, the newer Mozilla
browsers (actually I think they said Netscape) supported syntax like :

window.open(URL ,"diagwin","modal=1, width=30");

For IE I use :
window.showModalDialog

I assumed that since Firefox is a modern browser that it would support
custom modal windows.
Does anyone know what I am doing wrong?

Thanks...


May 2 '07 #1
Share this Question
Share on Google+
4 Replies


P: n/a
On May 3, 9:30 am, "John Kotuby" <j...@powerlist.comwrote:
Hi all...

I am bulding an application and wish to use custom Modal dialog windows.
For cross-browser support, build them using HTML elements.

According to a couple of recent articles I have seen, the newer Mozilla
browsers (actually I think they said Netscape) supported syntax like :

window.open(URL ,"diagwin","modal=1, width=30");
Try:

<URL: http://developer.mozilla.org/en/docs...ing_privileges
>
[...]
I assumed that since Firefox is a modern browser that it would support
custom modal windows.
You assume that support for modal windows is a sign of modernity.
--
Rob

May 3 '07 #2

P: n/a
John Kotuby wrote :
Hi all...

I am bulding an application and wish to use custom Modal dialog windows.
According to a couple of recent articles I have seen, the newer Mozilla
browsers (actually I think they said Netscape) supported syntax like :

window.open(URL ,"diagwin","modal=1, width=30");
1- modal requires extended security privileges

2- there should be no blank space separating window features in the 3rd
parameter of the function called.
wrong: "modal=1, width=30"
correct: "modal=1,width=30"

" strWindowFeatures
Optional parameter. This parameter is the string which lists the
requested window features (window functionalities and toolbars) of the
new browser window. This string parameter must not contain any blank
space. Each requested window feature must be separated by a comma inside
the character string."
http://developer.mozilla.org/en/docs...ow.open#Syntax

3- width must be greater than 100pixels. Non-chrome windows must all be
greater than 100px.
For IE I use :
window.showModalDialog

I assumed that since Firefox is a modern browser that it would support
custom modal windows.
Does anyone know what I am doing wrong?
As mentioned by Rob, all of the info necessary is at:

DOM:window.open
http://developer.mozilla.org/en/docs/DOM:window.open

Gérard
--
Using Web Standards in your Web Pages (Updated Dec. 2006)
http://developer.mozilla.org/en/docs...your_Web_Pages
May 3 '07 #3

P: n/a
Gérard Talbot wrote:
2- there should be no blank space separating window features in the 3rd
parameter of the function called.
wrong: "modal=1, width=30"
correct: "modal=1,width=30"

" strWindowFeatures
Optional parameter. This parameter is the string which lists the
requested window features (window functionalities and toolbars) of the
new browser window. This string parameter must not contain any blank
space. Each requested window feature must be separated by a comma inside
the character string."
http://developer.mozilla.org/en/docs...ow.open#Syntax
Thanks Gérard, as per usual, great information. I actually did not know
that strWindowFeatures

http://developer.mozilla.org/en/docs...and_parameters

....was not supposed to contain blank spaces. I have always used blank
spaces with no error. Are there any known issues where using additional
spaces causes problems?

Pointless (as most of my information requests are), but I was just
curious. I know in the future to not use extraneous whitespace.

--
-Lost
Remove the extra words to reply by e-mail. Don't e-mail me. I am
kidding. No I am not.
May 4 '07 #4

P: n/a
Thank you all for the education. Now that I understand how modality presents
a security risk it makes sense that the newer browsers require special
priviledges for its use. The links to the articles are greatly appreciated.
Sometimes finding the right documentation can be the most difficult part of
development.

I may choose another route, possibly using a visibility=hidden (or lower
z-order?) <divor some other element that will appear when necessary, and
process everything inside the same window. It seems that cross-browser
compatibility is still an issue after all these years of browser evolution
and W3C standards.

"Gérard Talbot" <ne***********@gtalbot.orgwrote in message
news:13*************@corp.supernews.com...
John Kotuby wrote :
>Hi all...

I am bulding an application and wish to use custom Modal dialog windows.
According to a couple of recent articles I have seen, the newer Mozilla
browsers (actually I think they said Netscape) supported syntax like :

window.open(URL ,"diagwin","modal=1, width=30");

1- modal requires extended security privileges

2- there should be no blank space separating window features in the 3rd
parameter of the function called.
wrong: "modal=1, width=30"
correct: "modal=1,width=30"

" strWindowFeatures
Optional parameter. This parameter is the string which lists the
requested window features (window functionalities and toolbars) of the new
browser window. This string parameter must not contain any blank space.
Each requested window feature must be separated by a comma inside the
character string."
http://developer.mozilla.org/en/docs...ow.open#Syntax

3- width must be greater than 100pixels. Non-chrome windows must all be
greater than 100px.
>For IE I use :
window.showModalDialog

I assumed that since Firefox is a modern browser that it would support
custom modal windows.
Does anyone know what I am doing wrong?

As mentioned by Rob, all of the info necessary is at:

DOM:window.open
http://developer.mozilla.org/en/docs/DOM:window.open

Gérard
--
Using Web Standards in your Web Pages (Updated Dec. 2006)
http://developer.mozilla.org/en/docs...your_Web_Pages


May 4 '07 #5

This discussion thread is closed

Replies have been disabled for this discussion.