org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-857CF71D-3398-40C2-981A-DEC428A7BA6B.html
author Eugene Ostroukhov <eugeneo@symbian.org>
Wed, 09 Jun 2010 15:16:09 -0700
changeset 367 f0817aeb2d7e
parent 229 716254ccbcc0
permissions -rw-r--r--
Minor coding problem was fixed


<!DOCTYPE html
  PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<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
menu object </title><script type="text/javascript">
      function initPage() {}
    </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
menu object</h1><div>
<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
1.0</a>.</p>
<p>The <code>menu</code> object is a built-in JavaScript object
in the widget engine. It is extended from the <code>window</code> object
to provide widget-specific APIs for manipulating widget's options menu and
softkeys.</p>
<p>The <code>menu</code> object can be accessed via the window
object <code>window.menu</code> or just simply <code>menu</code>.
Thus, in the WRT environment, the term <code>menu</code> is a reserved
keyword and should not be used as a user-defined global variable name for
other type of objects.</p>
<p>A widget's options menu can be constructed using the <code>menu</code> object.
The options menu is automatically associated with the device's left softkey
and it cannot be reassigned to associate with another softkey (for example,
the right softkey). The label of the options menu (the left softkey) is the
system-defined term in the current used system language (for example, <code>Options</code> for
English). Thus, the left softkey label cannot be changed.</p>
<p><code>menu</code> object methods:</p>
<ul>
<li><p><a href="GUID-704CF29C-1FDC-4192-9338-C8B9B926111C.html#GUID-704CF29C-1FDC-4192-9338-C8B9B926111C"><code>append()</code></a></p>
</li>
<li><p><a href="GUID-CE03834C-A275-458D-8FD3-086A472C28E2.html#GUID-CE03834C-A275-458D-8FD3-086A472C28E2"><code>remove()</code></a></p>
</li>
<li><p><a href="GUID-860D488F-98AA-4EF2-BDEC-8400A642CBD6.html#GUID-860D488F-98AA-4EF2-BDEC-8400A642CBD6"><code>getMenuItemById()</code></a></p>
</li>
<li><p><a href="GUID-6359AD9D-2D02-4265-8B47-AF18713AB726.html#GUID-6359AD9D-2D02-4265-8B47-AF18713AB726"><code>getMenuItemByName()</code></a></p>
</li>
<li><p><a href="GUID-5610C4B8-8988-4895-8F88-36F444B4ACFC.html#GUID-5610C4B8-8988-4895-8F88-36F444B4ACFC"><code>setRightSoftkeyLebel()</code></a></p>
</li>
<li><p><a href="GUID-ED95464B-9BA7-4294-A06F-CA80429B70ED.html#GUID-ED95464B-9BA7-4294-A06F-CA80429B70ED"><code>showSoftkeys()</code></a></p>
</li>
<li><p><a href="GUID-876B67CB-99C0-4925-A51C-646EA5F867B6.html#GUID-876B67CB-99C0-4925-A51C-646EA5F867B6"><code>hideSoftkeys()</code></a></p>
</li>
<li><p><a href="GUID-AD589188-128C-4A48-B25C-BF0B4D9923C8.html#GUID-AD589188-128C-4A48-B25C-BF0B4D9923C8"><code>clear()</code></a></p>
</li>
</ul>
<p><code>menu</code> object property:</p>
<ul>
<li><p><a href="GUID-9FE7E588-7621-4067-9BEC-4F59855BB42F.html#GUID-9FE7E588-7621-4067-9BEC-4F59855BB42F"><code>onShow</code></a></p>
</li>
</ul>
<p>For more general information on constructing an options menu and manipulating
softkeys, see <a href="GUID-94946735-D23B-49C6-BB65-8BE31737AE42.html#GUID-94946735-D23B-49C6-BB65-8BE31737AE42">Using softkeys</a>.</p>
</div></div></div><div class="footer"><hr/><div class="copy">© Nokia 2009.</div></div></body></html>