[whatwg] modal and modeless windows

Jon Barnett jonbarnett at gmail.com
Fri Apr 27 05:30:13 PDT 2007


On 4/26/07, Ian Hickson <ian at hixie.ch> wrote:
>
> On Sun, 26 Jun 2005, Karl Pongratz wrote:
> >
> > I had a short look at the webforms and web applications specification at
> > whatwg.org, I didn't find anything about modal and modeless windows. If
> > there is anything to improve for html, xhtml, xforms and compound
> > documents, then, in my opinion, the first missing feature that comes
> > into my mind is the lack of modal and modeless windows.
>
> I've now added window.open(), irrelevant="", and target="" to the
> specification, which should provide various ways of obtaining the effect
> you're looking for. For example, with irrelevant="" you can hide the
> content you want to disable, and force the "modal" aspect of the
> application to be responded to before reshowing the other parts.


Can I ask how that would work with a dialog?  Would it be like this?

myframeddocument.designMode = "on";
mytoolbar.hyperlinkButton.onclick =  function() {
 myframeddocument.body.irrelevant = true;
 var dialog = window.open("hyperlinkDialog.html");
 // a dialog where the user may either enter a URL or choose from a preset
list of pages on his site

 dialog.onunload = function() {
  processHyperlinkSelections();
  myframeddocument.body.irrelevant = false;
 }
}

Is that really the best way?

Would that keep "dialog" on top of the main browser window until it's
dismissed?

I used the WYSIWYG example because I think it's a good case where authors
really want some sort of modal dialog that's synchronous in the opener
document's javascript.  Is there a better way to handle that?

I'm also curious why the "features" argument of window.open is supposed to
"have no effect".  That's something I can search the archives for on my own
if it's been asked and answered.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.whatwg.org/pipermail/whatwg-whatwg.org/attachments/20070427/a9e50349/attachment.htm>


More information about the whatwg mailing list