org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-857CF71D-3398-40C2-981A-DEC428A7BA6B.html
changeset 229 716254ccbcc0
equal deleted inserted replaced
228:913c9751c067 229:716254ccbcc0
       
     1 
       
     2 <!DOCTYPE html
       
     3   PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
       
     4 <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"/><meta name="copyright" content="(C) Copyright 2009"/><meta name="DC.rights.owner" content="(C) Copyright 2009"/><meta name="DC.Type" content="mobileconcept"/><meta name="DC.Title" content="JavaScript menu object"/><meta name="DC.Relation" scheme="URI" content="GUID-111DE423-9C84-4E4B-A45E-15081FE2A30D"/><meta name="DC.Relation" scheme="URI" content="GUID-6CD2776F-A868-4280-967F-4EB426212556"/><meta name="DC.Relation" scheme="URI" content="GUID-7C69DDA4-16F1-4A8F-BDB2-4CB0015B4E81"/><meta name="DC.Format" content="XHTML"/><meta name="DC.Identifier" content="GUID-857CF71D-3398-40C2-981A-DEC428A7BA6B"/><title>JavaScript
       
     5 menu object </title><script type="text/javascript">
       
     6       function initPage() {}
       
     7     </script><link href="../PRODUCT_PLUGIN/book.css" rel="stylesheet" type="text/css"/><link href="css/s60/style.css" rel="stylesheet" type="text/css" media="all"/></head><body onload="initPage();"><div class="body"><div class="contentLeft prTxt"><h1 class="pageHeading" id="GUID-857CF71D-3398-40C2-981A-DEC428A7BA6B">JavaScript
       
     8 menu object</h1><div>
       
     9 <p>The <code>menu</code> object is supported since <a href="GUID-1A3ECAC1-3F09-4602-A1CD-82164040A664.html#GUID-1A3ECAC1-3F09-4602-A1CD-82164040A664">WRT
       
    10 1.0</a>.</p>
       
    11 <p>The <code>menu</code> object is a built-in JavaScript object
       
    12 in the widget engine. It is extended from the <code>window</code> object
       
    13 to provide widget-specific APIs for manipulating widget's options menu and
       
    14 softkeys.</p>
       
    15 <p>The <code>menu</code> object can be accessed via the window
       
    16 object <code>window.menu</code> or just simply <code>menu</code>.
       
    17 Thus, in the WRT environment, the term <code>menu</code> is a reserved
       
    18 keyword and should not be used as a user-defined global variable name for
       
    19 other type of objects.</p>
       
    20 <p>A widget's options menu can be constructed using the <code>menu</code> object.
       
    21 The options menu is automatically associated with the device's left softkey
       
    22 and it cannot be reassigned to associate with another softkey (for example,
       
    23 the right softkey). The label of the options menu (the left softkey) is the
       
    24 system-defined term in the current used system language (for example, <code>Options</code> for
       
    25 English). Thus, the left softkey label cannot be changed.</p>
       
    26 <p><code>menu</code> object methods:</p>
       
    27 <ul>
       
    28 <li><p><a href="GUID-704CF29C-1FDC-4192-9338-C8B9B926111C.html#GUID-704CF29C-1FDC-4192-9338-C8B9B926111C"><code>append()</code></a></p>
       
    29 </li>
       
    30 <li><p><a href="GUID-CE03834C-A275-458D-8FD3-086A472C28E2.html#GUID-CE03834C-A275-458D-8FD3-086A472C28E2"><code>remove()</code></a></p>
       
    31 </li>
       
    32 <li><p><a href="GUID-860D488F-98AA-4EF2-BDEC-8400A642CBD6.html#GUID-860D488F-98AA-4EF2-BDEC-8400A642CBD6"><code>getMenuItemById()</code></a></p>
       
    33 </li>
       
    34 <li><p><a href="GUID-6359AD9D-2D02-4265-8B47-AF18713AB726.html#GUID-6359AD9D-2D02-4265-8B47-AF18713AB726"><code>getMenuItemByName()</code></a></p>
       
    35 </li>
       
    36 <li><p><a href="GUID-5610C4B8-8988-4895-8F88-36F444B4ACFC.html#GUID-5610C4B8-8988-4895-8F88-36F444B4ACFC"><code>setRightSoftkeyLebel()</code></a></p>
       
    37 </li>
       
    38 <li><p><a href="GUID-ED95464B-9BA7-4294-A06F-CA80429B70ED.html#GUID-ED95464B-9BA7-4294-A06F-CA80429B70ED"><code>showSoftkeys()</code></a></p>
       
    39 </li>
       
    40 <li><p><a href="GUID-876B67CB-99C0-4925-A51C-646EA5F867B6.html#GUID-876B67CB-99C0-4925-A51C-646EA5F867B6"><code>hideSoftkeys()</code></a></p>
       
    41 </li>
       
    42 <li><p><a href="GUID-AD589188-128C-4A48-B25C-BF0B4D9923C8.html#GUID-AD589188-128C-4A48-B25C-BF0B4D9923C8"><code>clear()</code></a></p>
       
    43 </li>
       
    44 </ul>
       
    45 <p><code>menu</code> object property:</p>
       
    46 <ul>
       
    47 <li><p><a href="GUID-9FE7E588-7621-4067-9BEC-4F59855BB42F.html#GUID-9FE7E588-7621-4067-9BEC-4F59855BB42F"><code>onShow</code></a></p>
       
    48 </li>
       
    49 </ul>
       
    50 <p>For more general information on constructing an options menu and manipulating
       
    51 softkeys, see <a href="GUID-94946735-D23B-49C6-BB65-8BE31737AE42.html#GUID-94946735-D23B-49C6-BB65-8BE31737AE42">Using softkeys</a>.</p>
       
    52 </div></div></div><div class="footer"><hr/><div class="copy">© Nokia 2009.</div></div></body></html>