Search completed in 1.01 seconds.
8 results for "ondialogcancel":
Creating Dialogs - Archive of obsolete content
fferent platforms have a specific order in which the buttons appear. example dialog source view <?xml version="1.0"?> <?xml-stylesheet href="chrome://global/skin/global.css" type="text/css"?> <dialog id="donothing" title="dialog example" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" buttons="accept,cancel" ondialogaccept="return dook();"
ondialogcancel="return docancel();"> <script> function dook(){ alert("you pressed ok!"); return true; } function docancel(){ alert("you pressed cancel!"); return true; } </script> <description value="select a button"/> </dialog> you may place any elements that you wish in a dialog. the dialog element has some additional attributes that windows do not have. the buttons attribute is used to specify ...
...hat windows do not have. the buttons attribute is used to specify which buttons should appear in the dialog. the following values may be used, seperated by commas: accept - an ok button cancel - a cancel button help - a help button disclosure - a disclosure button, which is used for showing more information you can set code to execute when the buttons are pressed using the ondialogaccept,
ondialogcancel, ondialoghelp and ondialogdisclosure attributes. if you try the example above, you will find that the dook() function is called when the ok button is pressed and the docancel() function is called when the cancel button is pressed. the two functions dook() and docancel() both return true, which indicates that the dialog should be closed. if the dialog shouldn't be closed, false should be returned...
..."text/css"?> <dialog id="mydialog" title="my dialog" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" onload="window.sizetocontent();" buttons="accept,cancel" buttonlabelaccept="set favourite" buttonaccesskeyaccept="s" ondialogaccept="return dosave();" buttonlabelcancel="cancel" buttonaccesskeycancel="n"
ondialogcancel="return docancel();"> <script> function dosave(){ //dosomething() return true; } function docancel(){ return true; } </script> <dialogheader title="my dialog" description="example dialog"/> <groupbox flex="1"> <caption label="select favourite fruit"/> <radio id="orange" label="oranges because they are fruity"/> <radio id="violet" selected="true" label="strawberries because of their co...
prefwindow - Archive of obsolete content
parentwindow. this does not work with prefwindows, breaking the general behavior of the window and in particular the list of prefpanes. prefer the classical window.opendialog() with the following window features: "chrome,titlebar,toolbar,centerscreen,dialog=yes". ...
...e acceptdialog method is called. returning false doesn't currently prevent the dialog from closing, but does prevent saving (bug 474527). ondialogaccept type: script code the code in this attribute is called when the accept button is pressed, or when the acceptdialog method is called. if the handler returns true, the dialog will indeed go away, but if it returns false it will not.
ondialogcancel type: script code the code in this attribute is called when the "cancel" button is pressed or when the canceldialog method is called. if the routine returns true, the dialog will indeed go away, but if it returns false it will not. ondialogdisclosure type: script code the code in this attribute is called when the "disclosure" button is pressed. ondialoghelp type: script code the...
Chapter 3: Introduction to XUL—How to build a more intuitive UI - Archive of obsolete content
ccept button or cancel button will simply close that dialog. listing 8 shows a simple dialog example, and figure 5 shows its output. <?xml version="1.0" encoding="utf-8"?> <?xml-stylesheet href="chrome://global/skin/"?> <dialog xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" title="my dialog" buttons="accept,cancel" ondialogaccept="savevalues(); window.close();"
ondialogcancel="window.close();"> <checkbox label="my option"/> </dialog> listing 8: a dialog figure 5: output from listing 8 note: the functions behind the dialog elements discussed here require "xpconnect privileges," which are discussed in chapter 4, so this example will only run correctly if it can run as firefox code itself or installed extension code. please be aware that if you attempt to open th...
Adding windows and dialogs - Archive of obsolete content
king dialogs from scratch or overriding the default dialog css styles. the dialog element handles all of this transparently. all you need to do is define which buttons you'll need and the actions associated with them. <dialog id="xulschoolhello-hello-dialog" title="&xulschoolhello.hellodialog.title;" buttons="accept,cancel" ondialogaccept="return xulschoolchrome.hellodialog.accept();"
ondialogcancel="return xulschoolchrome.hellodialog.cancel();" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> carefully read the specification of the dialog element. you'll see that you can choose from a wide variety of buttons, associate any action you need to them, override their labels, and even add completely customized extra buttons. all of this without having to worry about you...
Attribute (XUL) - Archive of obsolete content
maxlength maxpos maxrows maxwidth member menu menuactive min minheight minresultsforpopup minwidth mode modifiers mousethrough movetoclick multiline multiple name negate newlines next noautofocus noautohide noinitialfocus nomatch norestorefocus object observes onbeforeaccept onbookmarkgroup onchange onclick onclosetab oncommand oncommandupdate ondialogaccept
ondialogcancel ondialogclosure ondialogextra1 ondialogextra2 ondialoghelp onerror onerrorcommand onextra1 onextra2 oninput onload onnewtab onpageadvanced onpagehide onpagerewound onpageshow onpaneload onpopuphidden onpopuphiding onpopupshowing onpopupshown onsearchcomplete onselect ontextcommand ontextentered ontextrevert ontextreverted onunload onwizardback onwizardcancel onwizard...
Index - Archive of obsolete content
onclick xul attributes, xul reference no summary! 220 onclosetab xul attributes, xul reference no summary! 221 oncommand xul attributes, xul reference no summary! 222 oncommandupdate xul attributes, xul reference no summary! 223 ondialogaccept xul attributes, xul reference no summary! 224
ondialogcancel xul attributes, xul reference no summary! 225 ondialogdisclosure xul attributes, xul reference no summary! 226 ondialogextra1 xul attributes, xul reference no summary! 227 ondialogextra2 xul attributes, xul reference no summary! 228 ondialoghelp xul attributes, xul reference no summary! 229 on...
Dialogs in XULRunner - Archive of obsolete content
="text/css"?> <dialog id="mydialog" title="my dialog" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" onload="window.sizetocontent();" buttons="accept,cancel" buttonlabelaccept="set favorite" buttonaccesskeyaccept="s" ondialogaccept="return dosave();" buttonlabelcancel="cancel" buttonaccesskeycancel="n"
ondialogcancel="return docancel();"> <script> function dosave(){ //dosomething() return true; } function docancel(){ return true; } </script> <dialogheader title="my dialog" description="example dialog"/> <groupbox flex="1"> <caption label="select favorite fruit"/> <radiogroup> <radio id="1" label="oranges because they are fruity"/> <radio id="2" se...