1 <!DOCTYPE HTML PUBLIC
"-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
4 <title>API: button YAHOO.widget.Button (YUI Library)
</title>
5 <link rel=
"stylesheet" type=
"text/css" href=
"assets/api.css">
9 <div id=
"doc3" class=
"yui-t2">
12 <h1>Yahoo! UI Library
</h1>
13 <h3>Button
<span class=
"subtitle">2.2.0</span></h3>
15 <a href=
"./index.html">Yahoo! UI Library
</a>
16 > <a href=
"./module_button.html">button
</a>
17 > YAHOO.widget.Button
32 Class
<b>YAHOO.widget.Button
</b>
33 <span class=
"extends">
34 - extends
<a href=
"YAHOO.util.Element.html">YAHOO.util.Element
</a>
37 <span class=
"extends">
42 <!-- class tree goes here -->
47 <div class=
"summary description">
48 The Button class creates a rich, graphical button.
51 <div class=
"section constructor details">
52 <h3><a name=
"constructor_detail">Constructor
</a></h3>
55 <strong>YAHOO.widget.Button
</strong>
69 <div class=
"description">
76 String specifying the id attribute of the
77 <code><input
></code>,
<code><a
></code> or
78 <code><span
></code> element to be used to create the button.
82 <<a href=
"http://www.w3.org/TR/2000/WD-DOM-Level-1-20000929/level-
83 one-html.html#ID-6043025">HTMLInputElement
</a>|
<a href=
"
84 http://www.w3.org/TR/2000/WD-DOM-Level-1-20000929/level-one-html.html#
85 ID-33759296">HTMLElement
</a>>
87 Object reference for the
88 <code><input
></code>,
<code><a
></code> or
89 <code><span
></code> element to be used to create the button.
95 Object literal specifying a set of configuration
96 attributes used to create the button.
102 Optional. Object literal specifying a set of
103 configuration attributes used to create the button.
113 <div class=
"section field details">
114 <h3><a name=
"field_detail">Properties
</a></h3>
115 <div class=
"content">
116 <h4><a name=
"_activationButtonPressed">_activationButtonPressed
</a>
117 <code>- protected Boolean
</code>
120 <div class=
"description">
121 Boolean indicating if the mouse button that toggles the button's
122 "active" state has been pressed.
127 <div class=
"default">
133 <h4><a name=
"_activationKeyPressed">_activationKeyPressed
</a>
134 <code>- protected Boolean
</code>
137 <div class=
"description">
138 Boolean indicating if the key(s) that toggle the button's
139 "active" state have been pressed.
144 <div class=
"default">
150 <h4><a name=
"_button">_button
</a>
151 <code>- protected
<a href=
"http://www.w3.org/TR/2000/WD-DOM-Level-1-20000929/level-
152 one-html.html#ID-48250443">HTMLAnchorElement
</a>|
<a href=
"
153 http://www.w3.org/TR/2000/WD-DOM-Level-1-20000929/level-one-html.html#ID-
154 34812697">HTMLButtonElement
</a></code>
157 <div class=
"description">
158 Object reference to the button's internal
159 <code><a
></code> or
<code><button
></code> element.
164 <div class=
"default">
170 <h4><a name=
"_hasKeyEventHandlers">_hasKeyEventHandlers
</a>
171 <code>- protected Boolean
</code>
174 <div class=
"description">
175 Boolean indicating if the button's
"blur",
"keydown" and
176 "keyup" event handlers are assigned
181 <div class=
"default">
187 <h4><a name=
"_hasMouseEventHandlers">_hasMouseEventHandlers
</a>
188 <code>- protected Boolean
</code>
191 <div class=
"description">
192 Boolean indicating if the button's
"mouseout" and
"mousedown"
193 and
"mouseup" event handlers are assigned
198 <div class=
"default">
204 <h4><a name=
"_menu">_menu
</a>
205 <code>- protected
<a href=
"YAHOO.widget.Menu.html">YAHOO.widget.Menu
</a></code>
208 <div class=
"description">
209 Object reference to the button's menu.
214 <div class=
"default">
220 <h4><a name=
"_onclickAttributeValue">_onclickAttributeValue
</a>
221 <code>- protected Object
</code>
224 <div class=
"description">
225 Object reference to the button's current value for the
"onclick"
226 configuration attribute.
231 <div class=
"default">
237 <h4><a name=
"_oninitAttributeValue">_oninitAttributeValue
</a>
238 <code>- protected Object
</code>
241 <div class=
"description">
242 Object reference to the button's current value for the
"oninit"
243 configuration attribute.
248 <div class=
"default">
254 <h4><a name=
"ACTIVATION_KEYS">ACTIVATION_KEYS
</a>
255 <code>- final Array
</code>
258 <div class=
"description">
259 Array of numbers representing keys that (when presed) toggle
260 the button's
"active" state.
265 <div class=
"default">
266 Default Value: [
13,
32]
271 <h4><a name=
"CHECK_ACTIVATION_KEYS">CHECK_ACTIVATION_KEYS
</a>
272 <code>- final Array
</code>
275 <div class=
"description">
276 Array of numbers representing keys that (when pressed) toggle
277 the button's
"checked" attribute.
282 <div class=
"default">
288 <h4><a name=
"CHECKBOX_CHECKED_TITLE">CHECKBOX_CHECKED_TITLE
</a>
289 <code>- final String
</code>
292 <div class=
"description">
293 String representing the title applied to buttons of type
294 "checkbox" when checked.
299 <div class=
"default">
300 Default Value:
"Checked. Click to uncheck."
305 <h4><a name=
"CHECKBOX_DEFAULT_TITLE">CHECKBOX_DEFAULT_TITLE
</a>
306 <code>- final String
</code>
309 <div class=
"description">
310 String representing the default title applied to buttons of
316 <div class=
"default">
317 Default Value:
"Unchecked. Click to check."
322 <h4><a name=
"CSS_CLASS_NAME">CSS_CLASS_NAME
</a>
323 <code>- final String
</code>
326 <div class=
"description">
327 String representing the CSS class(es) to be applied to the
328 button's root element.
333 <div class=
"default">
334 Default Value:
"yuibutton"
339 <h4><a name=
"MENUBUTTON_DEFAULT_TITLE">MENUBUTTON_DEFAULT_TITLE
</a>
340 <code>- final String
</code>
343 <div class=
"description">
344 String representing the default title applied to buttons of
350 <div class=
"default">
351 Default Value:
"Menu collapsed. Click to expand."
356 <h4><a name=
"MENUBUTTON_MENU_VISIBLE_TITLE">MENUBUTTON_MENU_VISIBLE_TITLE
</a>
357 <code>- final String
</code>
360 <div class=
"description">
361 String representing the title applied to buttons of type
362 "menubutton" when the button's menu is visible.
367 <div class=
"default">
368 Default Value:
"Menu expanded. Click or press Esc to collapse."
373 <h4><a name=
"OPTION_AREA_WIDTH">OPTION_AREA_WIDTH
</a>
374 <code>- final Number
</code>
377 <div class=
"description">
378 Width (in pixels) of the area of a split button that when
379 pressed will display a menu.
384 <div class=
"default">
390 <h4><a name=
"RADIO_CHECKED_TITLE">RADIO_CHECKED_TITLE
</a>
391 <code>- final String
</code>
394 <div class=
"description">
395 String representing the title applied to buttons of type
"radio"
401 <div class=
"default">
402 Default Value:
"Checked. Click to uncheck."
407 <h4><a name=
"RADIO_DEFAULT_TITLE">RADIO_DEFAULT_TITLE
</a>
408 <code>- final String
</code>
411 <div class=
"description">
412 String representing the default title applied to buttons of
418 <div class=
"default">
419 Default Value:
"Unchecked. Click to check."
424 <h4><a name=
"SPLITBUTTON_DEFAULT_TITLE">SPLITBUTTON_DEFAULT_TITLE
</a>
425 <code>- final String
</code>
428 <div class=
"description">
429 String representing the default title applied to buttons of
435 <div class=
"default">
436 Default Value:
"Menu collapsed. Click inside option region or press
437 Ctrl + Shift + M to show the menu."
442 <h4><a name=
"SPLITBUTTON_OPTION_VISIBLE_TITLE">SPLITBUTTON_OPTION_VISIBLE_TITLE
</a>
443 <code>- final String
</code>
446 <div class=
"description">
447 String representing the title applied to buttons of type
448 "splitbutton" when the button's menu is visible.
453 <div class=
"default">
454 Default Value:
"Menu expanded. Press Esc or Ctrl + Shift + M to hide the menu."
459 <h4><a name=
"SUBMIT_TITLE">SUBMIT_TITLE
</a>
460 <code>- final String
</code>
463 <div class=
"description">
464 String representing the title applied to buttons of
470 <div class=
"default">
471 Default Value:
"Click to submit form."
476 <h4><a name=
"TAG_NAME">TAG_NAME
</a>
477 <code>- final String
</code>
480 <div class=
"description">
481 The name of the tag to be used for the button's root element.
486 <div class=
"default">
487 Default Value:
"SPAN"
497 <div class=
"section field inheritance">
498 <h4>Properties inherited from
<a href=
"YAHOO.util.Element.html">YAHOO.util.Element
</a>:
</h4>
499 <div class=
"content">
502 <a href=
"YAHOO.util.Element.html#DOM_EVENTS">DOM_EVENTS
</a>
506 <div class=
"section field inheritance">
507 <h4>Properties inherited from
<a href=
"YAHOO.util.AttributeProvider.html">YAHOO.util.AttributeProvider
</a>:
</h4>
508 <div class=
"content">
511 <a href=
"YAHOO.util.AttributeProvider.html#_configs">_configs
</a>
515 <div class=
"section field inheritance">
516 <h4>Properties inherited from
<a href=
"YAHOO.util.EventProvider.html">YAHOO.util.EventProvider
</a>:
</h4>
517 <div class=
"content">
520 <a href=
"YAHOO.util.EventProvider.html#__yui_events">__yui_events
</a>,
521 <a href=
"YAHOO.util.EventProvider.html#__yui_subscribers">__yui_subscribers
</a>
526 <div class=
"section method details">
527 <h3><a name=
"methodDetails">Methods
</a></h3>
528 <div class=
"content">
530 <a name=
"_createButtonElement">_createButtonElement
</a></h4>
536 <a href=
"http://www.w3.org/TR/2000/WD-DOM-Level-1-20000929/
537 level-one-html.html#ID-58190037">HTMLElement
</a>
538 <strong>_createButtonElement
</strong>
548 <div class=
"description">
549 Creates the button's element.
552 <div class=
"description">
557 <code>p_sType
<String
></code>
558 String indicating the type of element to create.
565 <a href=
"http://www.w3.org/TR/2000/WD-DOM-Level-1-20000929/
566 level-one-html.html#ID-58190037">HTMLElement
</a>
576 <a name=
"_hideMenu">_hideMenu
</a></h4>
583 <strong>_hideMenu
</strong>
588 <div class=
"description">
589 Hides the button's menu.
592 <div class=
"description">
608 <a name=
"_isActivationKey">_isActivationKey
</a></h4>
615 <strong>_isActivationKey
</strong>
625 <div class=
"description">
626 Determines if the specified keycode is one that toggles the
627 button's
"active" state.
630 <div class=
"description">
635 <code>p_nKeyCode
<Number
></code>
636 Number representing the keycode to be evaluated.
653 <a name=
"_isSplitButtonOptionKey">_isSplitButtonOptionKey
</a></h4>
660 <strong>_isSplitButtonOptionKey
</strong>
670 <div class=
"description">
671 Determines if the specified keycode is one that toggles the
672 display of the split button's menu.
675 <div class=
"description">
680 <code>p_oEvent
<Event
></code>
681 Object representing the DOM event object passed
682 back by the event utility (YAHOO.util.Event).
699 <a name=
"_onAppendTo">_onAppendTo
</a></h4>
706 <strong>_onAppendTo
</strong>
716 <div class=
"description">
717 "appendTo" event handler for the button.
720 <div class=
"description">
725 <code>p_oEvent
<Event
></code>
726 Object representing the DOM event object passed
727 back by the event utility (YAHOO.util.Event).
744 <a name=
"_onBlur">_onBlur
</a></h4>
751 <strong>_onBlur
</strong>
765 <div class=
"description">
766 "blur" event handler for the button.
769 <div class=
"description">
774 <code>p_oEvent
<Event
></code>
775 Object representing the DOM event object passed
776 back by the event utility (YAHOO.util.Event).
779 <code>p_oButton
<YAHOO.widget.Button
></code>
780 Object representing the button.
797 <a name=
"_onClick">_onClick
</a></h4>
804 <strong>_onClick
</strong>
814 <div class=
"description">
815 "click" event handler for the button.
818 <div class=
"description">
823 <code>p_oEvent
<Event
></code>
824 Object representing the DOM event object passed
825 back by the event utility (YAHOO.util.Event).
842 <a name=
"_onDocumentKeyUp">_onDocumentKeyUp
</a></h4>
849 <strong>_onDocumentKeyUp
</strong>
863 <div class=
"description">
864 "keyup" event handler for the document.
867 <div class=
"description">
872 <code>p_oEvent
<Event
></code>
873 Object representing the DOM event object passed
874 back by the event utility (YAHOO.util.Event).
877 <code>p_oButton
<YAHOO.widget.Button
></code>
878 Object representing the button.
895 <a name=
"_onDocumentMouseDown">_onDocumentMouseDown
</a></h4>
902 <strong>_onDocumentMouseDown
</strong>
916 <div class=
"description">
917 "mousedown" event handler for the document.
920 <div class=
"description">
925 <code>p_oEvent
<Event
></code>
926 Object representing the DOM event object passed
927 back by the event utility (YAHOO.util.Event).
930 <code>p_oButton
<YAHOO.widget.Button
></code>
931 Object representing the button.
948 <a name=
"_onDocumentMouseUp">_onDocumentMouseUp
</a></h4>
955 <strong>_onDocumentMouseUp
</strong>
969 <div class=
"description">
970 "mouseup" event handler for the button.
973 <div class=
"description">
978 <code>p_oEvent
<Event
></code>
979 Object representing the DOM event object passed
980 back by the event utility (YAHOO.util.Event).
983 <code>p_oButton
<YAHOO.widget.Button
></code>
984 Object representing the button.
1001 <a name=
"_onFocus">_onFocus
</a></h4>
1002 <div class=
"detail">
1008 <strong>_onFocus
</strong>
1022 <div class=
"description">
1023 "focus" event handler for the button.
1026 <div class=
"description">
1029 <dt>Parameters:
</dt>
1031 <code>p_oEvent
<Event
></code>
1032 Object representing the DOM event object passed
1033 back by the event utility (YAHOO.util.Event).
1036 <code>p_oButton
<YAHOO.widget.Button
></code>
1037 Object representing the button that
1055 <a name=
"_onFormReset">_onFormReset
</a></h4>
1056 <div class=
"detail">
1062 <strong>_onFormReset
</strong>
1076 <div class=
"description">
1077 "reset" event handler for the button's form.
1080 <div class=
"description">
1083 <dt>Parameters:
</dt>
1085 <code>p_oEvent
<Event
></code>
1086 Object representing the DOM event object passed
1087 back by the event utility (YAHOO.util.Event).
1090 <code>p_oButton
<YAHOO.widget.Button
></code>
1091 Object representing the button.
1108 <a name=
"_onFormSubmit">_onFormSubmit
</a></h4>
1109 <div class=
"detail">
1115 <strong>_onFormSubmit
</strong>
1129 <div class=
"description">
1130 "submit" event handler for the button's form.
1133 <div class=
"description">
1136 <dt>Parameters:
</dt>
1138 <code>p_oEvent
<Event
></code>
1139 Object representing the DOM event object passed
1140 back by the event utility (YAHOO.util.Event).
1143 <code>p_oButton
<YAHOO.widget.Button
></code>
1144 Object representing the button.
1161 <a name=
"_onKeyDown">_onKeyDown
</a></h4>
1162 <div class=
"detail">
1168 <strong>_onKeyDown
</strong>
1182 <div class=
"description">
1183 "keydown" event handler for the button.
1186 <div class=
"description">
1189 <dt>Parameters:
</dt>
1191 <code>p_oEvent
<Event
></code>
1192 Object representing the DOM event object passed
1193 back by the event utility (YAHOO.util.Event).
1196 <code>p_oButton
<YAHOO.widget.Button
></code>
1197 Object representing the button.
1214 <a name=
"_onKeyUp">_onKeyUp
</a></h4>
1215 <div class=
"detail">
1221 <strong>_onKeyUp
</strong>
1235 <div class=
"description">
1236 "keyup" event handler for the button.
1239 <div class=
"description">
1242 <dt>Parameters:
</dt>
1244 <code>p_oEvent
<Event
></code>
1245 Object representing the DOM event object passed
1246 back by the event utility (YAHOO.util.Event).
1249 <code>p_oButton
<YAHOO.widget.Button
></code>
1250 Object representing the button.
1267 <a name=
"_onMenuClick">_onMenuClick
</a></h4>
1268 <div class=
"detail">
1274 <strong>_onMenuClick
</strong>
1292 <div class=
"description">
1293 "click" event handler for the button's menu.
1296 <div class=
"description">
1299 <dt>Parameters:
</dt>
1301 <code>p_sType
<String
></code>
1302 String representing the name of the event that
1306 <code>p_aArgs
<Array
></code>
1307 Array of arguments sent when the event was fired.
1310 <code>p_oButton
<YAHOO.widget.Button
></code>
1311 Object representing the menu's button.
1328 <a name=
"_onMenuHide">_onMenuHide
</a></h4>
1329 <div class=
"detail">
1335 <strong>_onMenuHide
</strong>
1353 <div class=
"description">
1354 "hide" event handler for the button's menu.
1357 <div class=
"description">
1360 <dt>Parameters:
</dt>
1362 <code>p_sType
<String
></code>
1363 String representing the name of the event that
1367 <code>p_aArgs
<Array
></code>
1368 Array of arguments sent when the event was fired.
1371 <code>p_oButton
<YAHOO.widget.Button
></code>
1372 Object representing the button.
1389 <a name=
"_onMenuItemAdded">_onMenuItemAdded
</a></h4>
1390 <div class=
"detail">
1396 <strong>_onMenuItemAdded
</strong>
1414 <div class=
"description">
1415 "itemadded" event handler for the button's menu.
1418 <div class=
"description">
1421 <dt>Parameters:
</dt>
1423 <code>p_sType
<String
></code>
1424 String representing the name of the event that
1428 <code>p_aArgs
<Array
></code>
1429 Array of arguments sent when the event was fired.
1432 <code>p_oItem
<<a href=
"YAHOO.widget.MenuItem.html">YAHOO.widget.MenuItem
</a>></code>
1433 Object representing the menu item that subscribed to the event.
1450 <a name=
"_onMenuItemSelected">_onMenuItemSelected
</a></h4>
1451 <div class=
"detail">
1457 <strong>_onMenuItemSelected
</strong>
1475 <div class=
"description">
1476 "selectedchange" event handler for each item in the
1480 <div class=
"description">
1483 <dt>Parameters:
</dt>
1485 <code>p_sType
<String
></code>
1486 String representing the name of the event that
1490 <code>p_aArgs
<Array
></code>
1491 Array of arguments sent when the event was fired.
1494 <code>p_oItem
<<a href=
"YAHOO.widget.MenuItem.html">YAHOO.widget.MenuItem
</a>></code>
1495 Object representing the menu item that subscribed to the event.
1512 <a name=
"_onMenuKeyDown">_onMenuKeyDown
</a></h4>
1513 <div class=
"detail">
1519 <strong>_onMenuKeyDown
</strong>
1537 <div class=
"description">
1538 "keydown" event handler for the button's menu.
1541 <div class=
"description">
1544 <dt>Parameters:
</dt>
1546 <code>p_sType
<String
></code>
1547 String representing the name of the event that
1551 <code>p_aArgs
<Array
></code>
1552 Array of arguments sent when the event was fired.
1555 <code>p_oButton
<YAHOO.widget.Button
></code>
1556 Object representing the button.
1573 <a name=
"_onMenuRender">_onMenuRender
</a></h4>
1574 <div class=
"detail">
1580 <strong>_onMenuRender
</strong>
1598 <div class=
"description">
1599 "render" event handler for the button's menu.
1602 <div class=
"description">
1605 <dt>Parameters:
</dt>
1607 <code>p_sType
<String
></code>
1608 String representing the name of the event that
1612 <code>p_aArgs
<Array
></code>
1613 Array of arguments sent when the event was fired.
1616 <code>p_oButton
<YAHOO.widget.Button
></code>
1617 Object representing the button.
1634 <a name=
"_onMenuShow">_onMenuShow
</a></h4>
1635 <div class=
"detail">
1641 <strong>_onMenuShow
</strong>
1659 <div class=
"description">
1660 "show" event handler for the button's menu.
1663 <div class=
"description">
1666 <dt>Parameters:
</dt>
1668 <code>p_sType
<String
></code>
1669 String representing the name of the event that
1673 <code>p_aArgs
<Array
></code>
1674 Array of arguments sent when the event was fired.
1677 <code>p_oButton
<YAHOO.widget.Button
></code>
1678 Object representing the button.
1695 <a name=
"_onMouseDown">_onMouseDown
</a></h4>
1696 <div class=
"detail">
1702 <strong>_onMouseDown
</strong>
1712 <div class=
"description">
1713 "mousedown" event handler for the button.
1716 <div class=
"description">
1719 <dt>Parameters:
</dt>
1721 <code>p_oEvent
<Event
></code>
1722 Object representing the DOM event object passed
1723 back by the event utility (YAHOO.util.Event).
1740 <a name=
"_onMouseOut">_onMouseOut
</a></h4>
1741 <div class=
"detail">
1747 <strong>_onMouseOut
</strong>
1757 <div class=
"description">
1758 "mouseout" event handler for the button.
1761 <div class=
"description">
1764 <dt>Parameters:
</dt>
1766 <code>p_oEvent
<Event
></code>
1767 Object representing the DOM event object passed
1768 back by the event utility (YAHOO.util.Event).
1785 <a name=
"_onMouseOver">_onMouseOver
</a></h4>
1786 <div class=
"detail">
1792 <strong>_onMouseOver
</strong>
1802 <div class=
"description">
1803 "mouseover" event handler for the button.
1806 <div class=
"description">
1809 <dt>Parameters:
</dt>
1811 <code>p_oEvent
<Event
></code>
1812 Object representing the DOM event object passed
1813 back by the event utility (YAHOO.util.Event).
1830 <a name=
"_onMouseUp">_onMouseUp
</a></h4>
1831 <div class=
"detail">
1837 <strong>_onMouseUp
</strong>
1847 <div class=
"description">
1848 "mouseup" event handler for the button.
1851 <div class=
"description">
1854 <dt>Parameters:
</dt>
1856 <code>p_oEvent
<Event
></code>
1857 Object representing the DOM event object passed
1858 back by the event utility (YAHOO.util.Event).
1875 <a name=
"_onOption">_onOption
</a></h4>
1876 <div class=
"detail">
1882 <strong>_onOption
</strong>
1892 <div class=
"description">
1893 "option" event handler for the button.
1896 <div class=
"description">
1899 <dt>Parameters:
</dt>
1901 <code>p_oEvent
<Event
></code>
1902 Object representing the DOM event object passed
1903 back by the event utility (YAHOO.util.Event).
1920 <a name=
"_setAccessKey">_setAccessKey
</a></h4>
1921 <div class=
"detail">
1927 <strong>_setAccessKey
</strong>
1937 <div class=
"description">
1938 Sets the value of the button's
"accesskey" attribute.
1941 <div class=
"description">
1944 <dt>Parameters:
</dt>
1946 <code>p_sAccessKey
<String
></code>
1947 String indicating the value for the button's
1948 "accesskey" attribute.
1965 <a name=
"_setChecked">_setChecked
</a></h4>
1966 <div class=
"detail">
1972 <strong>_setChecked
</strong>
1982 <div class=
"description">
1983 Sets the value of the button's
"target" attribute.
1986 <div class=
"description">
1989 <dt>Parameters:
</dt>
1991 <code>p_bChecked
<Boolean
></code>
1992 Boolean indicating the value for the button's
1993 "checked" attribute.
2010 <a name=
"_setDisabled">_setDisabled
</a></h4>
2011 <div class=
"detail">
2017 <strong>_setDisabled
</strong>
2027 <div class=
"description">
2028 Sets the value of the button's
"disabled" attribute.
2031 <div class=
"description">
2034 <dt>Parameters:
</dt>
2036 <code>p_bDisabled
<Boolean
></code>
2037 Boolean indicating the value for the button's
2038 "disabled" attribute.
2055 <a name=
"_setHref">_setHref
</a></h4>
2056 <div class=
"detail">
2062 <strong>_setHref
</strong>
2072 <div class=
"description">
2073 Sets the value of the button's
"href" attribute.
2076 <div class=
"description">
2079 <dt>Parameters:
</dt>
2081 <code>p_sHref
<String
></code>
2082 String indicating the value for the button's
2100 <a name=
"_setLabel">_setLabel
</a></h4>
2101 <div class=
"detail">
2107 <strong>_setLabel
</strong>
2117 <div class=
"description">
2118 Sets the value of the button's
"label" attribute.
2121 <div class=
"description">
2124 <dt>Parameters:
</dt>
2126 <code>p_sLabel
<String
></code>
2127 String indicating the value for the button's
2145 <a name=
"_setMenu">_setMenu
</a></h4>
2146 <div class=
"detail">
2152 <strong>_setMenu
</strong>
2162 <div class=
"description">
2163 Sets the value of the button's
"menu" attribute.
2166 <div class=
"description">
2169 <dt>Parameters:
</dt>
2171 <code>p_oMenu
<Object
></code>
2172 Object indicating the value for the button's
2190 <a name=
"_setOnClick">_setOnClick
</a></h4>
2191 <div class=
"detail">
2197 <strong>_setOnClick
</strong>
2207 <div class=
"description">
2208 Sets the value of the button's
"onclick" attribute.
2211 <div class=
"description">
2214 <dt>Parameters:
</dt>
2216 <code>p_oObject
<Object
></code>
2217 Object indicating the value for the button's
2218 "onclick" attribute.
2235 <a name=
"_setOnInit">_setOnInit
</a></h4>
2236 <div class=
"detail">
2242 <strong>_setOnInit
</strong>
2252 <div class=
"description">
2253 Sets the value of the button's
"init" attribute.
2256 <div class=
"description">
2259 <dt>Parameters:
</dt>
2261 <code>p_oObject
<Object
></code>
2262 Object indicating the value for the button's
2280 <a name=
"_setTabIndex">_setTabIndex
</a></h4>
2281 <div class=
"detail">
2287 <strong>_setTabIndex
</strong>
2297 <div class=
"description">
2298 Sets the value of the button's
"tabindex" attribute.
2301 <div class=
"description">
2304 <dt>Parameters:
</dt>
2306 <code>p_nTabIndex
<Number
></code>
2307 Number indicating the value for the button's
2308 "tabindex" attribute.
2325 <a name=
"_setTarget">_setTarget
</a></h4>
2326 <div class=
"detail">
2332 <strong>_setTarget
</strong>
2342 <div class=
"description">
2343 Sets the value of the button's
"target" attribute.
2346 <div class=
"description">
2349 <dt>Parameters:
</dt>
2351 <code>p_sTarget
<String
></code>
2352 String indicating the value for the button's
2370 <a name=
"_setTitle">_setTitle
</a></h4>
2371 <div class=
"detail">
2377 <strong>_setTitle
</strong>
2387 <div class=
"description">
2388 Sets the value of the button's
"title" attribute.
2391 <div class=
"description">
2394 <dt>Parameters:
</dt>
2396 <code>p_nTabIndex
<String
></code>
2397 Number indicating the value for the button's
2415 <a name=
"_setType">_setType
</a></h4>
2416 <div class=
"detail">
2422 <strong>_setType
</strong>
2432 <div class=
"description">
2433 Sets the value of the button's
"type" attribute.
2436 <div class=
"description">
2439 <dt>Parameters:
</dt>
2441 <code>p_sType
<String
></code>
2442 String indicating the value for the button's
2460 <a name=
"_showMenu">_showMenu
</a></h4>
2461 <div class=
"detail">
2467 <strong>_showMenu
</strong>
2472 <div class=
"description">
2473 Shows the button's menu.
2476 <div class=
"description">
2492 <a name=
"_submitForm">_submitForm
</a></h4>
2493 <div class=
"detail">
2499 <strong>_submitForm
</strong>
2504 <div class=
"description">
2505 Submits the form to which the button belongs.
2508 <div class=
"description">
2524 <a name=
"addHiddenFieldsToForm">addHiddenFieldsToForm
</a></h4>
2525 <div class=
"detail">
2531 <strong>addHiddenFieldsToForm
</strong>
2541 <div class=
"description">
2542 Searches the specified form and adds hidden fields for instances
2543 of YAHOO.widget.Button that are of type
"radio," "checkbox," "menubutton,"
2547 <div class=
"description">
2550 <dt>Parameters:
</dt>
2552 <code>p_oForm
<<a href=
"http://www.w3.org/TR/2000/WD-DOM-Level-1-20000929/level-
2553 one-html.html#ID-40002357">HTMLFormElement
</a>></code>
2555 for the form to search.
2572 <a name=
"blur">blur
</a></h4>
2573 <div class=
"detail">
2579 <strong>blur
</strong>
2584 <div class=
"description">
2585 Causes the button to lose focus and fires the button's
2589 <div class=
"description">
2605 <a name=
"createHiddenField">createHiddenField
</a></h4>
2606 <div class=
"detail">
2611 <a href=
"http://www.w3.org/TR/2000/WD-DOM-Level-1-20000929/level-
2612 one-html.html#ID-6043025">HTMLInputElement
</a>
2613 <strong>createHiddenField
</strong>
2618 <div class=
"description">
2619 Creates the button's hidden form field and appends it to its
2623 <div class=
"description">
2629 <a href=
"http://www.w3.org/TR/2000/WD-DOM-Level-1-20000929/level-
2630 one-html.html#ID-6043025">HTMLInputElement
</a>
2640 <a name=
"createInputElement">createInputElement
</a></h4>
2641 <div class=
"detail">
2646 <a href=
"http://www.w3.org/TR/2000/WD-DOM-Level-1-20000929/level-
2647 one-html.html#ID-6043025">HTMLInputElement
</a>
2648 <strong>createInputElement
</strong>
2670 <div class=
"description">
2671 Creates an
<code><input
></code> element of the
2675 <div class=
"description">
2678 <dt>Parameters:
</dt>
2680 <code>p_sType
<String
></code>
2681 String specifying the type of
2682 <code><input
></code> element to create.
2685 <code>p_sName
<String
></code>
2686 String specifying the name of
2687 <code><input
></code> element to create.
2690 <code>p_sValue
<String
></code>
2691 String specifying the value of
2692 <code><input
></code> element to create.
2695 <code>p_bChecked
<String
></code>
2696 Boolean specifying if the
2697 <code><input
></code> element is to be checked.
2704 <a href=
"http://www.w3.org/TR/2000/WD-DOM-Level-1-20000929/level-
2705 one-html.html#ID-6043025">HTMLInputElement
</a>
2715 <a name=
"destroy">destroy
</a></h4>
2716 <div class=
"detail">
2722 <strong>destroy
</strong>
2727 <div class=
"description">
2728 Removes the button's element from its parent element and
2729 removes all event handlers.
2732 <div class=
"description">
2748 <a name=
"focus">focus
</a></h4>
2749 <div class=
"detail">
2755 <strong>focus
</strong>
2760 <div class=
"description">
2761 Causes the button to receive the focus and fires the button's
2765 <div class=
"description">
2781 <a name=
"getFirstElement">getFirstElement
</a></h4>
2782 <div class=
"detail">
2787 <a href=
"http://www.w3.org/TR/2000/WD-DOM-Level-1-20000929/
2788 level-one-html.html#ID-58190037">HTMLElement
</a>
2789 <strong>getFirstElement
</strong>
2799 <div class=
"description">
2800 Returns an HTML element's first HTML element node.
2803 <div class=
"description">
2806 <dt>Parameters:
</dt>
2808 <code>p_oElement
<<a href=
"http://www.w3.org/TR/2000/WD-DOM-Level-1-20000929/
2809 level-one-html.html#ID-58190037">HTMLElement
</a>></code>
2811 reference specifying the element to be evaluated.
2818 <a href=
"http://www.w3.org/TR/2000/WD-DOM-Level-1-20000929/
2819 level-one-html.html#ID-58190037">HTMLElement
</a>
2829 <a name=
"getForm">getForm
</a></h4>
2830 <div class=
"detail">
2835 <a href=
"http://www.w3.org/TR/2000/WD-DOM-Level-1-20000929/level-
2836 one-html.html#ID-40002357">HTMLFormElement
</a>
2837 <strong>getForm
</strong>
2842 <div class=
"description">
2843 Returns a reference to the button's menu.
2846 <div class=
"description">
2852 <a href=
"http://www.w3.org/TR/2000/WD-DOM-Level-1-20000929/level-
2853 one-html.html#ID-40002357">HTMLFormElement
</a>
2863 <a name=
"getMenu">getMenu
</a></h4>
2864 <div class=
"detail">
2869 <a href=
"YAHOO.widget.Menu.html">YAHOO.widget.Menu
</a>
2870 <strong>getMenu
</strong>
2875 <div class=
"description">
2876 Returns a reference to the button's menu.
2879 <div class=
"description">
2885 <a href=
"YAHOO.widget.Menu.html">YAHOO.widget.Menu
</a>
2895 <a name=
"hasFocus">hasFocus
</a></h4>
2896 <div class=
"detail">
2902 <strong>hasFocus
</strong>
2907 <div class=
"description">
2908 Returns a boolean indicating whether or not the button has focus.
2911 <div class=
"description">
2927 <a name=
"init">init
</a></h4>
2928 <div class=
"detail">
2934 <strong>init
</strong>
2952 <div class=
"description">
2953 The Button class's initialization method.
2956 <div class=
"description">
2959 <dt>Parameters:
</dt>
2961 <code>p_oElement
<String
></code>
2962 String specifying the id attribute of the
2963 <code><input
></code>,
<code><a
></code> or
2964 <code><span
></code> element to be used to create the button.
2967 <code>p_oElement
<<a href=
"http://www.w3.org/TR/2000/WD-DOM-Level-1-20000929/level-
2968 one-html.html#ID-6043025">HTMLInputElement
</a>|
<a href=
"
2969 http://www.w3.org/TR/2000/WD-DOM-Level-1-20000929/level-one-html.html#
2970 ID-33759296">HTMLElement
</a>></code>
2971 Object reference for the
2972 <code><input
></code>,
<code><a
></code> or
2973 <code><span
></code> element to be used to create the button.
2976 <code>p_oElement
<Object
></code>
2977 Object literal specifying a set of configuration
2978 attributes used to create the button.
2981 <code>p_oAttributes
<Object
></code>
2982 Optional. Object literal specifying a set of
2983 configuration attributes used to create the button.
3000 <a name=
"initAttributes">initAttributes
</a></h4>
3001 <div class=
"detail">
3007 <strong>initAttributes
</strong>
3017 <div class=
"description">
3018 Initializes all of the configuration attributes used to create
3022 <div class=
"description">
3025 <dt>Parameters:
</dt>
3027 <code>p_oAttributes
<Object
></code>
3028 Object literal specifying a set of
3029 configuration attributes used to create the button.
3046 <a name=
"initConfig">initConfig
</a></h4>
3047 <div class=
"detail">
3053 <strong>initConfig
</strong>
3063 <div class=
"description">
3064 Initializes the set of configuration attributes that are used to
3065 instantiate the button.
3068 <div class=
"description">
3071 <dt>Parameters:
</dt>
3073 <code>Object
<Object
></code>
3074 representing the button's set of
3075 configuration attributes.
3092 <a name=
"isActive">isActive
</a></h4>
3093 <div class=
"detail">
3099 <strong>isActive
</strong>
3104 <div class=
"description">
3105 Returns a boolean indicating whether or not the button is active.
3108 <div class=
"description">
3124 <a name=
"setAttributeFromDOMAttribute">setAttributeFromDOMAttribute
</a></h4>
3125 <div class=
"detail">
3131 <strong>setAttributeFromDOMAttribute
</strong>
3141 <div class=
"description">
3142 Gets the value of the specified DOM attribute and sets it
3143 into the collection of configuration attributes used to configure
3147 <div class=
"description">
3150 <dt>Parameters:
</dt>
3152 <code>p_sAttribute
<String
></code>
3153 String representing the name of the
3154 attribute to retrieve from the DOM element.
3171 <a name=
"setAttributesFromSrcElement">setAttributesFromSrcElement
</a></h4>
3172 <div class=
"detail">
3178 <strong>setAttributesFromSrcElement
</strong>
3192 <div class=
"description">
3193 Gets the values for all the attributes of the source element
3194 (either
<code><input
></code> or
<code><a
></code>) that map to
3195 Button configuration attributes and sets them into a collection that is
3196 passed to the Button constructor.
3199 <div class=
"description">
3202 <dt>Parameters:
</dt>
3204 <code>p_oElement
<<a href=
"http://www.w3.org/TR/2000/WD-DOM-Level-1-20000929/level-
3205 one-html.html#ID-6043025">HTMLInputElement
</a>|
<a href=
"http://www.w3.org/
3206 TR/2000/WD-DOM-Level-1-20000929/level-one-html.html#ID-
3207 48250443">HTMLAnchorElement
</a>></code>
3208 Object reference to the HTML
3209 element (either
<code><input
></code> or
<code><span
></code>)
3210 used to create the button.
3213 <code>p_oAttributes
<Object
></code>
3214 Object reference for the collection of
3215 configuration attributes used to create the button.
3232 <a name=
"setFormElementProperties">setFormElementProperties
</a></h4>
3233 <div class=
"detail">
3239 <strong>setFormElementProperties
</strong>
3244 <div class=
"description">
3245 Gets the value of the attributes from the form element and
3246 sets them into the collection of configuration attributes used to
3247 configure the button.
3250 <div class=
"description">
3266 <a name=
"toString">toString
</a></h4>
3267 <div class=
"detail">
3273 <strong>toString
</strong>
3278 <div class=
"description">
3279 Returns a string representing the button.
3282 <div class=
"description">
3300 <div class=
"section field inheritance">
3301 <h4>Methods inherited from
<a href=
"YAHOO.util.Element.html">YAHOO.util.Element
</a>:
</h4>
3302 <div class=
"content">
3305 <a href=
"YAHOO.util.Element.html#_registerHTMLAttr">_registerHTMLAttr
</a>,
3306 <a href=
"YAHOO.util.Element.html#addClass">addClass
</a>,
3307 <a href=
"YAHOO.util.Element.html#addListener">addListener
</a>,
3308 <a href=
"YAHOO.util.Element.html#appendChild">appendChild
</a>,
3309 <a href=
"YAHOO.util.Element.html#appendTo">appendTo
</a>,
3310 <a href=
"YAHOO.util.Element.html#fireQueue">fireQueue
</a>,
3311 <a href=
"YAHOO.util.Element.html#getElementsByClassName">getElementsByClassName
</a>,
3312 <a href=
"YAHOO.util.Element.html#getElementsByTagName">getElementsByTagName
</a>,
3313 <a href=
"YAHOO.util.Element.html#getStyle">getStyle
</a>,
3314 <a href=
"YAHOO.util.Element.html#hasChildNodes">hasChildNodes
</a>,
3315 <a href=
"YAHOO.util.Element.html#hasClass">hasClass
</a>,
3316 <a href=
"YAHOO.util.Element.html#initAttributes">initAttributes
</a>,
3317 <a href=
"YAHOO.util.Element.html#insertBefore">insertBefore
</a>,
3318 <a href=
"YAHOO.util.Element.html#on">on
</a>,
3319 <a href=
"YAHOO.util.Element.html#removeChild">removeChild
</a>,
3320 <a href=
"YAHOO.util.Element.html#removeClass">removeClass
</a>,
3321 <a href=
"YAHOO.util.Element.html#removeListener">removeListener
</a>,
3322 <a href=
"YAHOO.util.Element.html#replaceChild">replaceChild
</a>,
3323 <a href=
"YAHOO.util.Element.html#replaceClass">replaceClass
</a>,
3324 <a href=
"YAHOO.util.Element.html#setStyle">setStyle
</a>
3328 <div class=
"section field inheritance">
3329 <h4>Methods inherited from
<a href=
"YAHOO.util.AttributeProvider.html">YAHOO.util.AttributeProvider
</a>:
</h4>
3330 <div class=
"content">
3333 <a href=
"YAHOO.util.AttributeProvider.html#configureAttribute">configureAttribute
</a>,
3334 <a href=
"YAHOO.util.AttributeProvider.html#fireBeforeChangeEvent">fireBeforeChangeEvent
</a>,
3335 <a href=
"YAHOO.util.AttributeProvider.html#fireChangeEvent">fireChangeEvent
</a>,
3336 <a href=
"YAHOO.util.AttributeProvider.html#get">get
</a>,
3337 <a href=
"YAHOO.util.AttributeProvider.html#getAttributeConfig">getAttributeConfig
</a>,
3338 <a href=
"YAHOO.util.AttributeProvider.html#getAttributeKeys">getAttributeKeys
</a>,
3339 <a href=
"YAHOO.util.AttributeProvider.html#refresh">refresh
</a>,
3340 <a href=
"YAHOO.util.AttributeProvider.html#register">register
</a>,
3341 <a href=
"YAHOO.util.AttributeProvider.html#resetAttributeConfig">resetAttributeConfig
</a>,
3342 <a href=
"YAHOO.util.AttributeProvider.html#resetValue">resetValue
</a>,
3343 <a href=
"YAHOO.util.AttributeProvider.html#set">set
</a>,
3344 <a href=
"YAHOO.util.AttributeProvider.html#setAttributeConfig">setAttributeConfig
</a>,
3345 <a href=
"YAHOO.util.AttributeProvider.html#setAttributes">setAttributes
</a>
3349 <div class=
"section field inheritance">
3350 <h4>Methods inherited from
<a href=
"YAHOO.util.EventProvider.html">YAHOO.util.EventProvider
</a>:
</h4>
3351 <div class=
"content">
3354 <a href=
"YAHOO.util.EventProvider.html#createEvent">createEvent
</a>,
3355 <a href=
"YAHOO.util.EventProvider.html#fireEvent">fireEvent
</a>,
3356 <a href=
"YAHOO.util.EventProvider.html#hasEvent">hasEvent
</a>,
3357 <a href=
"YAHOO.util.EventProvider.html#subscribe">subscribe
</a>,
3358 <a href=
"YAHOO.util.EventProvider.html#unsubscribe">unsubscribe
</a>,
3359 <a href=
"YAHOO.util.EventProvider.html#unsubscribeAll">unsubscribeAll
</a>
3364 <div class=
"section method details">
3365 <h3><a name=
"methodDetails">Events
</a></h3>
3366 <div class=
"content">
3368 <a name=
"blur">blur
</a></h4>
3369 <div class=
"detail">
3374 <strong>blur
</strong>
3381 <div class=
"description">
3382 Fires when the menu item loses the input focus. Passes back a
3383 single object representing the original DOM event object passed back by the
3384 event utility (YAHOO.util.Event) when the event was fired. See
<a href=
"
3385 YAHOO.util.Element.html#addListener">Element.addListener
</a> for more
3386 information on listening for this event.
3389 <div class=
"description">
3399 <a name=
"focus">focus
</a></h4>
3400 <div class=
"detail">
3405 <strong>focus
</strong>
3412 <div class=
"description">
3413 Fires when the menu item receives focus. Passes back a single
3414 object representing the original DOM event object passed back by the event
3415 utility (YAHOO.util.Event) when the event was fired. See
<a href=
"
3416 YAHOO.util.Element.html#addListener">Element.addListener
</a> for more
3417 information on listening for this event.
3420 <div class=
"description">
3430 <a name=
"init">init
</a></h4>
3431 <div class=
"detail">
3436 <strong>init
</strong>
3443 <div class=
"description">
3444 Fires when the Button is initialized. Subscribe to this event
3445 by specifying a value for the
"oninit" configuration attribute. Format:
<br>
3446 <code> {
<br> <strong>fn:
</strong> Function,
// The handler to call
3447 when the event fires.
<br> <strong>obj:
</strong> Object,
// An object
3448 to pass back to the handler.
<br> <strong>scope:
</strong> Object
//
3449 The object to use for the scope of the handler.
<br> }
</code>
3452 <div class=
"description">
3462 <a name=
"option">option
</a></h4>
3463 <div class=
"detail">
3468 <strong>option
</strong>
3475 <div class=
"description">
3476 Fires when the user invokes the button's option. Passes back a
3477 single object representing the original DOM event (either
"mousedown" or
3478 "keydown") that caused the
"option" event to fire. See
<a href=
"
3479 YAHOO.util.Element.html#addListener">Element.addListener
</a> for more
3480 information on listening for this event.
3483 <div class=
"description">
3496 <div class=
"section field inheritance">
3497 <h4>Events inherited from
<a href=
"YAHOO.util.Element.html">YAHOO.util.Element
</a>:
</h4>
3498 <div class=
"content">
3501 <a href=
"YAHOO.util.Element.html#available">available
</a>,
3502 <a href=
"YAHOO.util.Element.html#contentReady">contentReady
</a>
3507 <div class=
"section field details">
3508 <h3><a name=
"field_detail">Configuration Attributes
</a></h3>
3509 <div class=
"content">
3510 <h4><a name=
"checked">checked
</a>
3511 <code>- Boolean
</code>
3513 <div class=
"detail">
3514 <div class=
"description">
3515 Boolean indicating if the button is checked. Applies only
3516 to buttons of type
"radio" and
"checkbox."
3521 <div class=
"default">
3522 Default Value: false
3526 <h4><a name=
"container">container
</a>
3527 <code>-
<a href=
"http://www.w3.org/TR/2000/WD-DOM-Level-1-20000929/
3528 level-one-html.html#ID-58190037">HTMLElement
</a>|String
</code>
3530 <div class=
"detail">
3531 <div class=
"description">
3532 HTML element reference or string specifying the id
3533 attribute of the HTML element that the button's markup should be
3539 <div class=
"default">
3544 <h4><a name=
"disabled">disabled
</a>
3545 <code>- Boolean
</code>
3547 <div class=
"detail">
3548 <div class=
"description">
3549 Boolean indicating if the button should be disabled.
3550 (Disabled buttons are dimmed and will not respond to user input
3556 <div class=
"default">
3557 Default Value: false
3561 <h4><a name=
"href">href
</a>
3562 <code>- String
</code>
3564 <div class=
"detail">
3565 <div class=
"description">
3566 String specifying the href for the button. Applies only to
3567 buttons of type
"link."
3574 <h4><a name=
"label">label
</a>
3575 <code>- String
</code>
3577 <div class=
"detail">
3578 <div class=
"description">
3579 String specifying the button's text label or innerHTML.
3584 <div class=
"default">
3589 <h4><a name=
"menu">menu
</a>
3590 <code>-
<a href=
"http://www.w3.org/TR/2000/WD-DOM-Level-1-20000929/
3591 level-one-html.html#ID-58190037">HTMLElement
</a>|String|Array
</code>
3593 <div class=
"detail">
3594 <div class=
"description">
3595 Object specifying the menu for the button. The value can be
3596 one of the following:
3598 <li>Object specifying a
<a href=
"YAHOO.widget.Menu.html">
3599 YAHOO.widget.Menu
</a> instance.
</li>
3600 <li>String specifying the id attribute of the
<code><div
></code>
3601 element used to create the menu.
</li>
3602 <li>String specifying the id attribute of the
3603 <code><select
></code> element used to create the menu.
</li>
3604 <li>Object specifying the
<code><div
></code> element used to
3605 create the menu.
</li>
3606 <li>Object specifying the
<code><select
></code> element used to
3607 create the menu.
</li>
3608 <li>Array of object literals, each representing a set of
3609 <a href=
"YAHOO.widget.MenuItem.html">YAHOO.widget.MenuItem
</a>
3610 configuration attributes.
</li>
3611 <li>Array of strings representing the text labels for each menu item in
3618 <div class=
"default">
3623 <h4><a name=
"name">name
</a>
3624 <code>- String
</code>
3626 <div class=
"detail">
3627 <div class=
"description">
3628 String specifying the name for the button.
3633 <div class=
"default">
3638 <h4><a name=
"onclick">onclick
</a>
3639 <code>- Object
</code>
3641 <div class=
"detail">
3642 <div class=
"description">
3643 Object literal representing the code to be executed when
3644 the button is clicked. Format:
<br> <code> {
<br>
3645 <strong>fn:
</strong> Function,
// The handler to call when the
3646 event fires.
<br> <strong>obj:
</strong> Object,
// An object to
3647 pass back to the handler.
<br> <strong>scope:
</strong> Object
//
3648 The object to use for the scope of the handler.
<br> }
</code>
3653 <div class=
"default">
3658 <h4><a name=
"oninit">oninit
</a>
3659 <code>- Object
</code>
3661 <div class=
"detail">
3662 <div class=
"description">
3663 Object literal representing the code to be executed when
3664 the button is initialized. Format:
<br> <code> {
<br>
3665 <strong>fn:
</strong> Function,
// The handler to call when the
3666 event fires.
<br> <strong>obj:
</strong> Object,
// An object to
3667 pass back to the handler.
<br> <strong>scope:
</strong> Object
//
3668 The object to use for the scope of the handler.
<br> }
</code>
3673 <div class=
"default">
3678 <h4><a name=
"selectedMenuItem">selectedMenuItem
</a>
3679 <code>-
<a href=
"YAHOO.widget.MenuItem.html">YAHOO.widget.MenuItem
</a></code>
3681 <div class=
"detail">
3682 <div class=
"description">
3683 Reference to the item in the button's menu that is
3689 <div class=
"default">
3694 <h4><a name=
"srcelement">srcelement
</a>
3695 <code>-
<a href=
"http://www.w3.org/TR/2000/WD-DOM-Level-1-20000929/
3696 level-one-html.html#ID-58190037">HTMLElement
</a>|String
</code>
3698 <div class=
"detail">
3699 <div class=
"description">
3700 Object reference to the HTML element (either
3701 <code><input
></code> or
<code><span
></code>) used to
3707 <div class=
"default">
3712 <h4><a name=
"tabindex">tabindex
</a>
3713 <code>- Number
</code>
3715 <div class=
"detail">
3716 <div class=
"description">
3717 Number specifying the tabindex for the button.
3722 <div class=
"default">
3727 <h4><a name=
"target">target
</a>
3728 <code>- String
</code>
3730 <div class=
"detail">
3731 <div class=
"description">
3732 String specifying the target for the button. Applies only
3733 to buttons of type
"link."
3740 <h4><a name=
"title">title
</a>
3741 <code>- String
</code>
3743 <div class=
"detail">
3744 <div class=
"description">
3745 String specifying the title for the button.
3750 <div class=
"default">
3755 <h4><a name=
"type">type
</a>
3756 <code>- String
</code>
3758 <div class=
"detail">
3759 <div class=
"description">
3760 String specifying the button's type. Possible values are:
3761 "button," "link," "submit," "reset," "checkbox," "radio," "menubutton,"
3767 <div class=
"default">
3768 Default Value:
"button"
3772 <h4><a name=
"value">value
</a>
3773 <code>- Object
</code>
3775 <div class=
"detail">
3776 <div class=
"description">
3777 Object specifying the value for the button.
3782 <div class=
"default">
3791 <div class=
"section field inheritance">
3792 <h4>Configuration attributes inherited from
<a href=
"YAHOO.util.Element.html">YAHOO.util.Element
</a>:
</h4>
3793 <div class=
"content">
3796 <a href=
"YAHOO.util.Element.html#element">element
</a>
3806 <div class=
"module">
3808 <ul class=
"content">
3810 <li class=
""><a href=
"module_animation.html">animation
</a></li>
3812 <li class=
""><a href=
"module_autocomplete.html">autocomplete
</a></li>
3814 <li class=
"selected"><a href=
"module_button.html">button
</a></li>
3816 <li class=
""><a href=
"module_calendar.html">calendar
</a></li>
3818 <li class=
""><a href=
"module_connection.html">connection
</a></li>
3820 <li class=
""><a href=
"module_container.html">container
</a></li>
3822 <li class=
""><a href=
"module_datasource.html">datasource
</a></li>
3824 <li class=
""><a href=
"module_datatable.html">datatable
</a></li>
3826 <li class=
""><a href=
"module_dom.html">dom
</a></li>
3828 <li class=
""><a href=
"module_dragdrop.html">dragdrop
</a></li>
3830 <li class=
""><a href=
"module_element.html">element
</a></li>
3832 <li class=
""><a href=
"module_event.html">event
</a></li>
3834 <li class=
""><a href=
"module_history.html">history
</a></li>
3836 <li class=
""><a href=
"module_logger.html">logger
</a></li>
3838 <li class=
""><a href=
"module_menu.html">menu
</a></li>
3840 <li class=
""><a href=
"module_slider.html">slider
</a></li>
3842 <li class=
""><a href=
"module_tabview.html">tabview
</a></li>
3844 <li class=
""><a href=
"module_treeview.html">treeview
</a></li>
3846 <li class=
""><a href=
"module_yahoo.html">yahoo
</a></li>
3850 <div class=
"module">
3852 <ul class=
"content">
3853 <li class=
"selected"><a href=
"YAHOO.widget.Button.html">YAHOO.widget.Button
</a></li>
3854 <li class=
""><a href=
"YAHOO.widget.ButtonGroup.html">YAHOO.widget.ButtonGroup
</a></li>
3858 <div class=
"module">
3860 <ul class=
"content">
3861 <li class=
""><a href=
"button.js.html">button.js
</a></li>
3862 <li class=
""><a href=
"buttongroup.js.html">buttongroup.js
</a></li>
3866 <div class=
"module">
3868 <ul class=
"content">
3869 <li><a href=
"#_activationButtonPressed">_activationButtonPressed
</a>
3870 <!--<code><String></code>-->
3872 <li><a href=
"#_activationKeyPressed">_activationKeyPressed
</a>
3873 <!--<code><String></code>-->
3875 <li><a href=
"#_button">_button
</a>
3876 <!--<code><String></code>-->
3878 <li><a href=
"#_hasKeyEventHandlers">_hasKeyEventHandlers
</a>
3879 <!--<code><String></code>-->
3881 <li><a href=
"#_hasMouseEventHandlers">_hasMouseEventHandlers
</a>
3882 <!--<code><String></code>-->
3884 <li><a href=
"#_menu">_menu
</a>
3885 <!--<code><String></code>-->
3887 <li><a href=
"#_onclickAttributeValue">_onclickAttributeValue
</a>
3888 <!--<code><String></code>-->
3890 <li><a href=
"#_oninitAttributeValue">_oninitAttributeValue
</a>
3891 <!--<code><String></code>-->
3893 <li><a href=
"#ACTIVATION_KEYS">ACTIVATION_KEYS
</a>
3894 <!--<code><String></code>-->
3896 <li><a href=
"#CHECK_ACTIVATION_KEYS">CHECK_ACTIVATION_KEYS
</a>
3897 <!--<code><String></code>-->
3899 <li><a href=
"#CHECKBOX_CHECKED_TITLE">CHECKBOX_CHECKED_TITLE
</a>
3900 <!--<code><String></code>-->
3902 <li><a href=
"#CHECKBOX_DEFAULT_TITLE">CHECKBOX_DEFAULT_TITLE
</a>
3903 <!--<code><String></code>-->
3905 <li><a href=
"#CSS_CLASS_NAME">CSS_CLASS_NAME
</a>
3906 <!--<code><String></code>-->
3908 <li><a href=
"#MENUBUTTON_DEFAULT_TITLE">MENUBUTTON_DEFAULT_TITLE
</a>
3909 <!--<code><String></code>-->
3911 <li><a href=
"#MENUBUTTON_MENU_VISIBLE_TITLE">MENUBUTTON_MENU_VISIBLE_TITLE
</a>
3912 <!--<code><String></code>-->
3914 <li><a href=
"#OPTION_AREA_WIDTH">OPTION_AREA_WIDTH
</a>
3915 <!--<code><String></code>-->
3917 <li><a href=
"#RADIO_CHECKED_TITLE">RADIO_CHECKED_TITLE
</a>
3918 <!--<code><String></code>-->
3920 <li><a href=
"#RADIO_DEFAULT_TITLE">RADIO_DEFAULT_TITLE
</a>
3921 <!--<code><String></code>-->
3923 <li><a href=
"#SPLITBUTTON_DEFAULT_TITLE">SPLITBUTTON_DEFAULT_TITLE
</a>
3924 <!--<code><String></code>-->
3926 <li><a href=
"#SPLITBUTTON_OPTION_VISIBLE_TITLE">SPLITBUTTON_OPTION_VISIBLE_TITLE
</a>
3927 <!--<code><String></code>-->
3929 <li><a href=
"#SUBMIT_TITLE">SUBMIT_TITLE
</a>
3930 <!--<code><String></code>-->
3932 <li><a href=
"#TAG_NAME">TAG_NAME
</a>
3933 <!--<code><String></code>-->
3938 <div class=
"module">
3940 <ul class=
"content">
3941 <li><!--<code><a href="http://www.w3.org/TR/2000/WD-DOM-Level-1-20000929/
3942 level-one-html.html#ID-58190037">HTMLElement</a></code>-->
3943 <a href=
"#_createButtonElement">_createButtonElement
</a>
3945 <li><!--<code>void</code>-->
3946 <a href=
"#_hideMenu">_hideMenu
</a>
3948 <li><!--<code>Boolean</code>-->
3949 <a href=
"#_isActivationKey">_isActivationKey
</a>
3951 <li><!--<code>Boolean</code>-->
3952 <a href=
"#_isSplitButtonOptionKey">_isSplitButtonOptionKey
</a>
3954 <li><!--<code>void</code>-->
3955 <a href=
"#_onAppendTo">_onAppendTo
</a>
3957 <li><!--<code>void</code>-->
3958 <a href=
"#_onBlur">_onBlur
</a>
3960 <li><!--<code>void</code>-->
3961 <a href=
"#_onClick">_onClick
</a>
3963 <li><!--<code>void</code>-->
3964 <a href=
"#_onDocumentKeyUp">_onDocumentKeyUp
</a>
3966 <li><!--<code>void</code>-->
3967 <a href=
"#_onDocumentMouseDown">_onDocumentMouseDown
</a>
3969 <li><!--<code>void</code>-->
3970 <a href=
"#_onDocumentMouseUp">_onDocumentMouseUp
</a>
3972 <li><!--<code>void</code>-->
3973 <a href=
"#_onFocus">_onFocus
</a>
3975 <li><!--<code>void</code>-->
3976 <a href=
"#_onFormReset">_onFormReset
</a>
3978 <li><!--<code>void</code>-->
3979 <a href=
"#_onFormSubmit">_onFormSubmit
</a>
3981 <li><!--<code>void</code>-->
3982 <a href=
"#_onKeyDown">_onKeyDown
</a>
3984 <li><!--<code>void</code>-->
3985 <a href=
"#_onKeyUp">_onKeyUp
</a>
3987 <li><!--<code>void</code>-->
3988 <a href=
"#_onMenuClick">_onMenuClick
</a>
3990 <li><!--<code>void</code>-->
3991 <a href=
"#_onMenuHide">_onMenuHide
</a>
3993 <li><!--<code>void</code>-->
3994 <a href=
"#_onMenuItemAdded">_onMenuItemAdded
</a>
3996 <li><!--<code>void</code>-->
3997 <a href=
"#_onMenuItemSelected">_onMenuItemSelected
</a>
3999 <li><!--<code>void</code>-->
4000 <a href=
"#_onMenuKeyDown">_onMenuKeyDown
</a>
4002 <li><!--<code>void</code>-->
4003 <a href=
"#_onMenuRender">_onMenuRender
</a>
4005 <li><!--<code>void</code>-->
4006 <a href=
"#_onMenuShow">_onMenuShow
</a>
4008 <li><!--<code>void</code>-->
4009 <a href=
"#_onMouseDown">_onMouseDown
</a>
4011 <li><!--<code>void</code>-->
4012 <a href=
"#_onMouseOut">_onMouseOut
</a>
4014 <li><!--<code>void</code>-->
4015 <a href=
"#_onMouseOver">_onMouseOver
</a>
4017 <li><!--<code>void</code>-->
4018 <a href=
"#_onMouseUp">_onMouseUp
</a>
4020 <li><!--<code>void</code>-->
4021 <a href=
"#_onOption">_onOption
</a>
4023 <li><!--<code>void</code>-->
4024 <a href=
"#_setAccessKey">_setAccessKey
</a>
4026 <li><!--<code>void</code>-->
4027 <a href=
"#_setChecked">_setChecked
</a>
4029 <li><!--<code>void</code>-->
4030 <a href=
"#_setDisabled">_setDisabled
</a>
4032 <li><!--<code>void</code>-->
4033 <a href=
"#_setHref">_setHref
</a>
4035 <li><!--<code>void</code>-->
4036 <a href=
"#_setLabel">_setLabel
</a>
4038 <li><!--<code>void</code>-->
4039 <a href=
"#_setMenu">_setMenu
</a>
4041 <li><!--<code>void</code>-->
4042 <a href=
"#_setOnClick">_setOnClick
</a>
4044 <li><!--<code>void</code>-->
4045 <a href=
"#_setOnInit">_setOnInit
</a>
4047 <li><!--<code>void</code>-->
4048 <a href=
"#_setTabIndex">_setTabIndex
</a>
4050 <li><!--<code>void</code>-->
4051 <a href=
"#_setTarget">_setTarget
</a>
4053 <li><!--<code>void</code>-->
4054 <a href=
"#_setTitle">_setTitle
</a>
4056 <li><!--<code>void</code>-->
4057 <a href=
"#_setType">_setType
</a>
4059 <li><!--<code>void</code>-->
4060 <a href=
"#_showMenu">_showMenu
</a>
4062 <li><!--<code>void</code>-->
4063 <a href=
"#_submitForm">_submitForm
</a>
4065 <li><!--<code>void</code>-->
4066 <a href=
"#addHiddenFieldsToForm">addHiddenFieldsToForm
</a>
4068 <li><!--<code>void</code>-->
4069 <a href=
"#blur">blur
</a>
4071 <li><!--<code><a href="http://www.w3.org/TR/2000/WD-DOM-Level-1-20000929/level-
4072 one-html.html#ID-6043025">HTMLInputElement</a></code>-->
4073 <a href=
"#createHiddenField">createHiddenField
</a>
4075 <li><!--<code><a href="http://www.w3.org/TR/2000/WD-DOM-Level-1-20000929/level-
4076 one-html.html#ID-6043025">HTMLInputElement</a></code>-->
4077 <a href=
"#createInputElement">createInputElement
</a>
4079 <li><!--<code>void</code>-->
4080 <a href=
"#destroy">destroy
</a>
4082 <li><!--<code>void</code>-->
4083 <a href=
"#focus">focus
</a>
4085 <li><!--<code><a href="http://www.w3.org/TR/2000/WD-DOM-Level-1-20000929/
4086 level-one-html.html#ID-58190037">HTMLElement</a></code>-->
4087 <a href=
"#getFirstElement">getFirstElement
</a>
4089 <li><!--<code><a href="http://www.w3.org/TR/2000/WD-DOM-Level-1-20000929/level-
4090 one-html.html#ID-40002357">HTMLFormElement</a></code>-->
4091 <a href=
"#getForm">getForm
</a>
4093 <li><!--<code><a href="YAHOO.widget.Menu.html">YAHOO.widget.Menu</a></code>-->
4094 <a href=
"#getMenu">getMenu
</a>
4096 <li><!--<code>Boolean</code>-->
4097 <a href=
"#hasFocus">hasFocus
</a>
4099 <li><!--<code>void</code>-->
4100 <a href=
"#init">init
</a>
4102 <li><!--<code>void</code>-->
4103 <a href=
"#initAttributes">initAttributes
</a>
4105 <li><!--<code>void</code>-->
4106 <a href=
"#initConfig">initConfig
</a>
4108 <li><!--<code>Boolean</code>-->
4109 <a href=
"#isActive">isActive
</a>
4111 <li><!--<code>void</code>-->
4112 <a href=
"#setAttributeFromDOMAttribute">setAttributeFromDOMAttribute
</a>
4114 <li><!--<code>void</code>-->
4115 <a href=
"#setAttributesFromSrcElement">setAttributesFromSrcElement
</a>
4117 <li><!--<code>void</code>-->
4118 <a href=
"#setFormElementProperties">setFormElementProperties
</a>
4120 <li><!--<code>String</code>-->
4121 <a href=
"#toString">toString
</a>
4126 <div class=
"module">
4128 <ul class=
"content">
4130 <a href=
"#blur">blur
</a>
4133 <a href=
"#focus">focus
</a>
4136 <a href=
"#init">init
</a>
4139 <a href=
"#option">option
</a>
4144 <div class=
"module">
4145 <h4>Configuration Attributes
</h4>
4146 <ul class=
"content">
4148 <a href=
"#checked">checked
</a>
4151 <a href=
"#container">container
</a>
4154 <a href=
"#disabled">disabled
</a>
4157 <a href=
"#href">href
</a>
4160 <a href=
"#label">label
</a>
4163 <a href=
"#menu">menu
</a>
4166 <a href=
"#name">name
</a>
4169 <a href=
"#onclick">onclick
</a>
4172 <a href=
"#oninit">oninit
</a>
4175 <a href=
"#selectedMenuItem">selectedMenuItem
</a>
4178 <a href=
"#srcelement">srcelement
</a>
4181 <a href=
"#tabindex">tabindex
</a>
4184 <a href=
"#target">target
</a>
4187 <a href=
"#title">title
</a>
4190 <a href=
"#type">type
</a>
4193 <a href=
"#value">value
</a>
4203 Copyright
© 2007 Yahoo! Inc. All rights reserved.