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

J

John Kotuby

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...
 
R

RobG

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/DOM:window.open#Features_requiring_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.
 
L

-Lost

Gérard Talbot said:
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/DOM:window.open#Syntax

Thanks Gérard, as per usual, great information. I actually did not know
that strWindowFeatures

http://developer.mozilla.org/en/docs/DOM:window.open#Return_value_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.
 
J

John Kotuby

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?) <div> or 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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,902
Latest member
Elena68X5

Latest Threads

Top