[Project_owners] capturing "enter" key for <window/> and <dialog/>?

Michael Vincent van Rantwijk some at universum.org
Wed May 25 16:03:36 EDT 2005


Eric Jung wrote:
> Excellent, thanks! I remember reading the docs for <button/> on
> XULPlanet once and seeing an attribute which "highlighted" the
> default button by drawing a thicker border around it. Now I can't
> find that attribute.
> 
> Anyone happen to know what it is?


Erix, this example might help you;

   setDefaultButton: function()
   {
     var dialogButton = document.documentElement.getButton("accept");
     dialogButton.removeAttribute("default");
     dialogButton = document.documentElement.getButton("cancel");
     dialogButton.setAttribute("default", "true");
     dialogButton.focus();
   }


More information about the Project_owners mailing list