org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-83BFFEB2-D4F5-48DF-830A-602961ACD47A.html
author Eugene Ostroukhov <eugeneo@symbian.org>
Fri, 04 Jun 2010 09:44:40 -0700
changeset 345 7723a46fe224
parent 229 716254ccbcc0
permissions -rw-r--r--
Bug 2480 - Excluded resources are still available in preview and debugger
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
229
716254ccbcc0 Fixed 2046: WRTKit help topics. Fixed 2170: Added support for Web Developer Library. Fixed 1952: Event Trigger icons unreadable
tasneems@symbian.org
parents:
diff changeset
     1
716254ccbcc0 Fixed 2046: WRTKit help topics. Fixed 2170: Added support for Web Developer Library. Fixed 1952: Event Trigger icons unreadable
tasneems@symbian.org
parents:
diff changeset
     2
<!DOCTYPE html
716254ccbcc0 Fixed 2046: WRTKit help topics. Fixed 2170: Added support for Web Developer Library. Fixed 1952: Event Trigger icons unreadable
tasneems@symbian.org
parents:
diff changeset
     3
  PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
716254ccbcc0 Fixed 2046: WRTKit help topics. Fixed 2170: Added support for Web Developer Library. Fixed 1952: Event Trigger icons unreadable
tasneems@symbian.org
parents:
diff changeset
     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="concept"/><meta name="DC.Title" content="Moving between views"/><meta name="abstract" content="Design intuitive ways for users to move between views by clicking buttons or links, selecting items, or pressing softkeys."/><meta name="description" content="Design intuitive ways for users to move between views by clicking buttons or links, selecting items, or pressing softkeys."/><meta name="DC.Relation" scheme="URI" content="GUID-E75BCEAE-6673-4ADF-9DC2-058F0C8C0DBB"/><meta name="DC.Relation" scheme="URI" content="GUID-5277B7B8-722A-48ED-9333-4DD2D6A085C0"/><meta name="DC.Relation" scheme="URI" content="GUID-D54DEFE7-E878-4530-B707-A5388DFE1D9D"/><meta name="DC.Relation" scheme="URI" content="GUID-C359CC7E-B8BA-491B-A0C4-0FF1D3C4110C"/><meta name="DC.Format" content="XHTML"/><meta name="DC.Identifier" content="GUID-83BFFEB2-D4F5-48DF-830A-602961ACD47A"/><meta name="DC.Language" content="en"/><title>Moving between views </title><script type="text/javascript">
716254ccbcc0 Fixed 2046: WRTKit help topics. Fixed 2170: Added support for Web Developer Library. Fixed 1952: Event Trigger icons unreadable
tasneems@symbian.org
parents:
diff changeset
     5
      function initPage() {}
716254ccbcc0 Fixed 2046: WRTKit help topics. Fixed 2170: Added support for Web Developer Library. Fixed 1952: Event Trigger icons unreadable
tasneems@symbian.org
parents:
diff changeset
     6
    </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-83BFFEB2-D4F5-48DF-830A-602961ACD47A">Moving between views</h1><div><p>Design intuitive ways for users to move between views by clicking buttons or links, selecting items, or pressing softkeys.</p>
716254ccbcc0 Fixed 2046: WRTKit help topics. Fixed 2170: Added support for Web Developer Library. Fixed 1952: Event Trigger icons unreadable
tasneems@symbian.org
parents:
diff changeset
     7
<p>Users can move between views in the following ways:</p>
716254ccbcc0 Fixed 2046: WRTKit help topics. Fixed 2170: Added support for Web Developer Library. Fixed 1952: Event Trigger icons unreadable
tasneems@symbian.org
parents:
diff changeset
     8
<ul>
716254ccbcc0 Fixed 2046: WRTKit help topics. Fixed 2170: Added support for Web Developer Library. Fixed 1952: Event Trigger icons unreadable
tasneems@symbian.org
parents:
diff changeset
     9
<li><p>Click button controls in views. </p><p>Use JavaScript to open a new page when users click a button.</p></li>
716254ccbcc0 Fixed 2046: WRTKit help topics. Fixed 2170: Added support for Web Developer Library. Fixed 1952: Event Trigger icons unreadable
tasneems@symbian.org
parents:
diff changeset
    10
<li><p>Select softkeys. </p><p>For example, you can add the <span class="uicontrol">Back</span> or <span class="uicontrol">Cancel</span> option to the right softkey to take users back to the original page. For more information, see <a href="GUID-94946735-D23B-49C6-BB65-8BE31737AE42.html#GUID-94946735-D23B-49C6-BB65-8BE31737AE42">Using softkeys</a>.</p></li>
716254ccbcc0 Fixed 2046: WRTKit help topics. Fixed 2170: Added support for Web Developer Library. Fixed 1952: Event Trigger icons unreadable
tasneems@symbian.org
parents:
diff changeset
    11
<li><p>Select items in the Options menu. </p></li>
716254ccbcc0 Fixed 2046: WRTKit help topics. Fixed 2170: Added support for Web Developer Library. Fixed 1952: Event Trigger icons unreadable
tasneems@symbian.org
parents:
diff changeset
    12
<li><p>Click links. </p><p>However, using links in widgets is not recommended. Links are one-way shortcuts; there is no direct path back to the original page. </p></li>
716254ccbcc0 Fixed 2046: WRTKit help topics. Fixed 2170: Added support for Web Developer Library. Fixed 1952: Event Trigger icons unreadable
tasneems@symbian.org
parents:
diff changeset
    13
</ul>
716254ccbcc0 Fixed 2046: WRTKit help topics. Fixed 2170: Added support for Web Developer Library. Fixed 1952: Event Trigger icons unreadable
tasneems@symbian.org
parents:
diff changeset
    14
<p>The <a href="http://www.forum.nokia.com/info/sw.nokia.com/id/1c27d9d7-8946-4e26-947d-2b140c454876/Web_Run-Time_AccuWidget_Example.html" target="_blank">AccuWidget example</a> illustrates changing views in different ways.</p>
716254ccbcc0 Fixed 2046: WRTKit help topics. Fixed 2170: Added support for Web Developer Library. Fixed 1952: Event Trigger icons unreadable
tasneems@symbian.org
parents:
diff changeset
    15
<div class="figure" id="GUID-D798EEAC-4C8A-4204-8A99-7E6011FB1F7D"><img src="GUID-D71A525A-01E7-403C-802A-8564EF825008_d0e4659_href.png"/><p class="figure-title"><strong>Figure: </strong>Selecting a button changes the view</p></div>
716254ccbcc0 Fixed 2046: WRTKit help topics. Fixed 2170: Added support for Web Developer Library. Fixed 1952: Event Trigger icons unreadable
tasneems@symbian.org
parents:
diff changeset
    16
<p>The <a href="GUID-775005BC-2FF8-45A9-BBA6-6CED6B5780A2.html#GUID-775005BC-2FF8-45A9-BBA6-6CED6B5780A2">STEW example</a> provides users with different ways to change views depending on whether the widget is run on a touch device. On touch devices, a button menu is provided, whereas an <span class="uicontrol">Options</span> menu that is associated with the left soft key is provided on other devices. For more information, see <a href="GUID-EB2043BB-E557-429B-BA0A-E350A6D06597.html#GUID-EB2043BB-E557-429B-BA0A-E350A6D06597">Designing STEW user interface</a>.</p>
716254ccbcc0 Fixed 2046: WRTKit help topics. Fixed 2170: Added support for Web Developer Library. Fixed 1952: Event Trigger icons unreadable
tasneems@symbian.org
parents:
diff changeset
    17
<div class="figure" id="GUID-C92297D6-CD5E-4ED5-A8A7-EB6A2CEEC693-GENIDd0e4824"><img src="GUID-5BB933A3-E1F3-47A5-B85F-A78C988C8779_d0e4678_href.png"/><p class="figure-title"><strong>Figure: </strong>STEW button menu</p></div>
716254ccbcc0 Fixed 2046: WRTKit help topics. Fixed 2170: Added support for Web Developer Library. Fixed 1952: Event Trigger icons unreadable
tasneems@symbian.org
parents:
diff changeset
    18
<div><h3>To use buttons to change views</h3><ol>
716254ccbcc0 Fixed 2046: WRTKit help topics. Fixed 2170: Added support for Web Developer Library. Fixed 1952: Event Trigger icons unreadable
tasneems@symbian.org
parents:
diff changeset
    19
<li id="GUID-A35CB9B1-26BA-429C-A4EE-4209010F735C"><a name="GUID-A35CB9B1-26BA-429C-A4EE-4209010F735C"><!----></a><p>In the HTML file, create clickable buttons that users select to change the view.</p><pre class="codeblock">    &lt;div id="locationsContainer" class="mainContainer"&gt;
716254ccbcc0 Fixed 2046: WRTKit help topics. Fixed 2170: Added support for Web Developer Library. Fixed 1952: Event Trigger icons unreadable
tasneems@symbian.org
parents:
diff changeset
    20
        &lt;h2&gt;Select the location:&lt;/h2&gt;
716254ccbcc0 Fixed 2046: WRTKit help topics. Fixed 2170: Added support for Web Developer Library. Fixed 1952: Event Trigger icons unreadable
tasneems@symbian.org
parents:
diff changeset
    21
            &lt;div id="locations"&gt;
716254ccbcc0 Fixed 2046: WRTKit help topics. Fixed 2170: Added support for Web Developer Library. Fixed 1952: Event Trigger icons unreadable
tasneems@symbian.org
parents:
diff changeset
    22
                &lt;table id="locationTable"&gt;
716254ccbcc0 Fixed 2046: WRTKit help topics. Fixed 2170: Added support for Web Developer Library. Fixed 1952: Event Trigger icons unreadable
tasneems@symbian.org
parents:
diff changeset
    23
                    &lt;tr&gt;
716254ccbcc0 Fixed 2046: WRTKit help topics. Fixed 2170: Added support for Web Developer Library. Fixed 1952: Event Trigger icons unreadable
tasneems@symbian.org
parents:
diff changeset
    24
                        &lt;td onclick="locationSelected(0, '10001', 'New York');"&gt;
716254ccbcc0 Fixed 2046: WRTKit help topics. Fixed 2170: Added support for Web Developer Library. Fixed 1952: Event Trigger icons unreadable
tasneems@symbian.org
parents:
diff changeset
    25
                            &lt;img src="gfx/city_icons/new_york.png" alt="New York" /&gt;&lt;br /&gt;
716254ccbcc0 Fixed 2046: WRTKit help topics. Fixed 2170: Added support for Web Developer Library. Fixed 1952: Event Trigger icons unreadable
tasneems@symbian.org
parents:
diff changeset
    26
                            New York
716254ccbcc0 Fixed 2046: WRTKit help topics. Fixed 2170: Added support for Web Developer Library. Fixed 1952: Event Trigger icons unreadable
tasneems@symbian.org
parents:
diff changeset
    27
                        &lt;/td&gt;
716254ccbcc0 Fixed 2046: WRTKit help topics. Fixed 2170: Added support for Web Developer Library. Fixed 1952: Event Trigger icons unreadable
tasneems@symbian.org
parents:
diff changeset
    28
                        &lt;td onclick="locationSelected(1, 'EUR|UK|UK241|LONDON', 'London');"&gt;
716254ccbcc0 Fixed 2046: WRTKit help topics. Fixed 2170: Added support for Web Developer Library. Fixed 1952: Event Trigger icons unreadable
tasneems@symbian.org
parents:
diff changeset
    29
                            &lt;img src="gfx/city_icons/london.png" alt="London" /&gt;&lt;br /&gt;
716254ccbcc0 Fixed 2046: WRTKit help topics. Fixed 2170: Added support for Web Developer Library. Fixed 1952: Event Trigger icons unreadable
tasneems@symbian.org
parents:
diff changeset
    30
                            London
716254ccbcc0 Fixed 2046: WRTKit help topics. Fixed 2170: Added support for Web Developer Library. Fixed 1952: Event Trigger icons unreadable
tasneems@symbian.org
parents:
diff changeset
    31
                        &lt;/td&gt;
716254ccbcc0 Fixed 2046: WRTKit help topics. Fixed 2170: Added support for Web Developer Library. Fixed 1952: Event Trigger icons unreadable
tasneems@symbian.org
parents:
diff changeset
    32
                        &lt;td onclick="locationSelected(2, 'EUR|FR|FR012|PARIS|', 'Paris');"&gt;
716254ccbcc0 Fixed 2046: WRTKit help topics. Fixed 2170: Added support for Web Developer Library. Fixed 1952: Event Trigger icons unreadable
tasneems@symbian.org
parents:
diff changeset
    33
                            &lt;img src="gfx/city_icons/paris.png" alt="Paris" /&gt;&lt;br /&gt;
716254ccbcc0 Fixed 2046: WRTKit help topics. Fixed 2170: Added support for Web Developer Library. Fixed 1952: Event Trigger icons unreadable
tasneems@symbian.org
parents:
diff changeset
    34
                            Paris
716254ccbcc0 Fixed 2046: WRTKit help topics. Fixed 2170: Added support for Web Developer Library. Fixed 1952: Event Trigger icons unreadable
tasneems@symbian.org
parents:
diff changeset
    35
                        &lt;/td&gt;
716254ccbcc0 Fixed 2046: WRTKit help topics. Fixed 2170: Added support for Web Developer Library. Fixed 1952: Event Trigger icons unreadable
tasneems@symbian.org
parents:
diff changeset
    36
                    &lt;/tr&gt;
716254ccbcc0 Fixed 2046: WRTKit help topics. Fixed 2170: Added support for Web Developer Library. Fixed 1952: Event Trigger icons unreadable
tasneems@symbian.org
parents:
diff changeset
    37
                    &lt;tr&gt;
716254ccbcc0 Fixed 2046: WRTKit help topics. Fixed 2170: Added support for Web Developer Library. Fixed 1952: Event Trigger icons unreadable
tasneems@symbian.org
parents:
diff changeset
    38
                        &lt;td onclick="locationSelected(3, 'OCN|AU|NSW|SYDNEY|', 'Sydney');"&gt;
716254ccbcc0 Fixed 2046: WRTKit help topics. Fixed 2170: Added support for Web Developer Library. Fixed 1952: Event Trigger icons unreadable
tasneems@symbian.org
parents:
diff changeset
    39
                            &lt;img src="gfx/city_icons/sydney.png" alt="Sydney" /&gt;&lt;br /&gt;
716254ccbcc0 Fixed 2046: WRTKit help topics. Fixed 2170: Added support for Web Developer Library. Fixed 1952: Event Trigger icons unreadable
tasneems@symbian.org
parents:
diff changeset
    40
                            Sydney
716254ccbcc0 Fixed 2046: WRTKit help topics. Fixed 2170: Added support for Web Developer Library. Fixed 1952: Event Trigger icons unreadable
tasneems@symbian.org
parents:
diff changeset
    41
                        &lt;/td&gt;
716254ccbcc0 Fixed 2046: WRTKit help topics. Fixed 2170: Added support for Web Developer Library. Fixed 1952: Event Trigger icons unreadable
tasneems@symbian.org
parents:
diff changeset
    42
                        &lt;td onclick="locationSelected(4, 'ASI|JP|JA041|TOKYO|', 'Tokyo');"&gt;
716254ccbcc0 Fixed 2046: WRTKit help topics. Fixed 2170: Added support for Web Developer Library. Fixed 1952: Event Trigger icons unreadable
tasneems@symbian.org
parents:
diff changeset
    43
                            &lt;img src="gfx/city_icons/tokyo.png" alt="Tokyo" /&gt;&lt;br /&gt;
716254ccbcc0 Fixed 2046: WRTKit help topics. Fixed 2170: Added support for Web Developer Library. Fixed 1952: Event Trigger icons unreadable
tasneems@symbian.org
parents:
diff changeset
    44
                            Tokyo
716254ccbcc0 Fixed 2046: WRTKit help topics. Fixed 2170: Added support for Web Developer Library. Fixed 1952: Event Trigger icons unreadable
tasneems@symbian.org
parents:
diff changeset
    45
                        &lt;/td&gt;
716254ccbcc0 Fixed 2046: WRTKit help topics. Fixed 2170: Added support for Web Developer Library. Fixed 1952: Event Trigger icons unreadable
tasneems@symbian.org
parents:
diff changeset
    46
                        &lt;td onclick="locationSelected(5, null, 'Custom location');"&gt;
716254ccbcc0 Fixed 2046: WRTKit help topics. Fixed 2170: Added support for Web Developer Library. Fixed 1952: Event Trigger icons unreadable
tasneems@symbian.org
parents:
diff changeset
    47
                            &lt;img src="gfx/city_icons/custom.png" alt="[Custom location]" /&gt;&lt;br /&gt;
716254ccbcc0 Fixed 2046: WRTKit help topics. Fixed 2170: Added support for Web Developer Library. Fixed 1952: Event Trigger icons unreadable
tasneems@symbian.org
parents:
diff changeset
    48
                            [Custom location]
716254ccbcc0 Fixed 2046: WRTKit help topics. Fixed 2170: Added support for Web Developer Library. Fixed 1952: Event Trigger icons unreadable
tasneems@symbian.org
parents:
diff changeset
    49
                    &lt;/td&gt;
716254ccbcc0 Fixed 2046: WRTKit help topics. Fixed 2170: Added support for Web Developer Library. Fixed 1952: Event Trigger icons unreadable
tasneems@symbian.org
parents:
diff changeset
    50
                &lt;/tr&gt;
716254ccbcc0 Fixed 2046: WRTKit help topics. Fixed 2170: Added support for Web Developer Library. Fixed 1952: Event Trigger icons unreadable
tasneems@symbian.org
parents:
diff changeset
    51
            &lt;/table&gt;
716254ccbcc0 Fixed 2046: WRTKit help topics. Fixed 2170: Added support for Web Developer Library. Fixed 1952: Event Trigger icons unreadable
tasneems@symbian.org
parents:
diff changeset
    52
        &lt;/div&gt;
716254ccbcc0 Fixed 2046: WRTKit help topics. Fixed 2170: Added support for Web Developer Library. Fixed 1952: Event Trigger icons unreadable
tasneems@symbian.org
parents:
diff changeset
    53
    &lt;/div&gt;</pre></li>
716254ccbcc0 Fixed 2046: WRTKit help topics. Fixed 2170: Added support for Web Developer Library. Fixed 1952: Event Trigger icons unreadable
tasneems@symbian.org
parents:
diff changeset
    54
<li id="GUID-497C0CC0-D18D-47A9-967C-946493595858"><a name="GUID-497C0CC0-D18D-47A9-967C-946493595858"><!----></a><p>Create JavaScript that changes the view. Use the HTML Document Object Model (DOM) <code>style</code> object to show or hide the display and the <a href="GUID-4AE77C0F-577E-4DC7-BC90-40A75C873404.html#GUID-4AE77C0F-577E-4DC7-BC90-40A75C873404"><code>prepareForTransition()</code></a> and <a href="GUID-AB8ECBA0-FD4B-4A2F-8199-40C7F7CD51AB.html#GUID-AB8ECBA0-FD4B-4A2F-8199-40C7F7CD51AB"><code>performTransition()</code></a> method of the <code>widget</code> object to disable updates to the widget UI to prevent screen flickering when the view changes.</p><pre class="codeblock">// Shows the placeholder for weather forecast
716254ccbcc0 Fixed 2046: WRTKit help topics. Fixed 2170: Added support for Web Developer Library. Fixed 1952: Event Trigger icons unreadable
tasneems@symbian.org
parents:
diff changeset
    55
function showForecast() {
716254ccbcc0 Fixed 2046: WRTKit help topics. Fixed 2170: Added support for Web Developer Library. Fixed 1952: Event Trigger icons unreadable
tasneems@symbian.org
parents:
diff changeset
    56
    // Reset the currently selected forecast
716254ccbcc0 Fixed 2046: WRTKit help topics. Fixed 2170: Added support for Web Developer Library. Fixed 1952: Event Trigger icons unreadable
tasneems@symbian.org
parents:
diff changeset
    57
    currentlySelectedForecast = CURRENT;
716254ccbcc0 Fixed 2046: WRTKit help topics. Fixed 2170: Added support for Web Developer Library. Fixed 1952: Event Trigger icons unreadable
tasneems@symbian.org
parents:
diff changeset
    58
716254ccbcc0 Fixed 2046: WRTKit help topics. Fixed 2170: Added support for Web Developer Library. Fixed 1952: Event Trigger icons unreadable
tasneems@symbian.org
parents:
diff changeset
    59
    widget.prepareForTransition("fade");
716254ccbcc0 Fixed 2046: WRTKit help topics. Fixed 2170: Added support for Web Developer Library. Fixed 1952: Event Trigger icons unreadable
tasneems@symbian.org
parents:
diff changeset
    60
716254ccbcc0 Fixed 2046: WRTKit help topics. Fixed 2170: Added support for Web Developer Library. Fixed 1952: Event Trigger icons unreadable
tasneems@symbian.org
parents:
diff changeset
    61
    // Hide the location list and show the forecast view
716254ccbcc0 Fixed 2046: WRTKit help topics. Fixed 2170: Added support for Web Developer Library. Fixed 1952: Event Trigger icons unreadable
tasneems@symbian.org
parents:
diff changeset
    62
    document.getElementById("locationsContainer").style.display = "none";
716254ccbcc0 Fixed 2046: WRTKit help topics. Fixed 2170: Added support for Web Developer Library. Fixed 1952: Event Trigger icons unreadable
tasneems@symbian.org
parents:
diff changeset
    63
    document.getElementById("forecastContainer").style.display = "block";
716254ccbcc0 Fixed 2046: WRTKit help topics. Fixed 2170: Added support for Web Developer Library. Fixed 1952: Event Trigger icons unreadable
tasneems@symbian.org
parents:
diff changeset
    64
716254ccbcc0 Fixed 2046: WRTKit help topics. Fixed 2170: Added support for Web Developer Library. Fixed 1952: Event Trigger icons unreadable
tasneems@symbian.org
parents:
diff changeset
    65
    // Change the right softkey so that it shows the location list
716254ccbcc0 Fixed 2046: WRTKit help topics. Fixed 2170: Added support for Web Developer Library. Fixed 1952: Event Trigger icons unreadable
tasneems@symbian.org
parents:
diff changeset
    66
    window.menu.setRightSoftkeyLabel("Back", showLocations);
716254ccbcc0 Fixed 2046: WRTKit help topics. Fixed 2170: Added support for Web Developer Library. Fixed 1952: Event Trigger icons unreadable
tasneems@symbian.org
parents:
diff changeset
    67
716254ccbcc0 Fixed 2046: WRTKit help topics. Fixed 2170: Added support for Web Developer Library. Fixed 1952: Event Trigger icons unreadable
tasneems@symbian.org
parents:
diff changeset
    68
    // Refresh the view
716254ccbcc0 Fixed 2046: WRTKit help topics. Fixed 2170: Added support for Web Developer Library. Fixed 1952: Event Trigger icons unreadable
tasneems@symbian.org
parents:
diff changeset
    69
    setTimeout("widget.performTransition();", 0);
716254ccbcc0 Fixed 2046: WRTKit help topics. Fixed 2170: Added support for Web Developer Library. Fixed 1952: Event Trigger icons unreadable
tasneems@symbian.org
parents:
diff changeset
    70
}
716254ccbcc0 Fixed 2046: WRTKit help topics. Fixed 2170: Added support for Web Developer Library. Fixed 1952: Event Trigger icons unreadable
tasneems@symbian.org
parents:
diff changeset
    71
716254ccbcc0 Fixed 2046: WRTKit help topics. Fixed 2170: Added support for Web Developer Library. Fixed 1952: Event Trigger icons unreadable
tasneems@symbian.org
parents:
diff changeset
    72
// Shows the location table
716254ccbcc0 Fixed 2046: WRTKit help topics. Fixed 2170: Added support for Web Developer Library. Fixed 1952: Event Trigger icons unreadable
tasneems@symbian.org
parents:
diff changeset
    73
function showLocations() {
716254ccbcc0 Fixed 2046: WRTKit help topics. Fixed 2170: Added support for Web Developer Library. Fixed 1952: Event Trigger icons unreadable
tasneems@symbian.org
parents:
diff changeset
    74
    widget.prepareForTransition("fade");
716254ccbcc0 Fixed 2046: WRTKit help topics. Fixed 2170: Added support for Web Developer Library. Fixed 1952: Event Trigger icons unreadable
tasneems@symbian.org
parents:
diff changeset
    75
716254ccbcc0 Fixed 2046: WRTKit help topics. Fixed 2170: Added support for Web Developer Library. Fixed 1952: Event Trigger icons unreadable
tasneems@symbian.org
parents:
diff changeset
    76
    // Hide the forecast view and show the city view
716254ccbcc0 Fixed 2046: WRTKit help topics. Fixed 2170: Added support for Web Developer Library. Fixed 1952: Event Trigger icons unreadable
tasneems@symbian.org
parents:
diff changeset
    77
    document.getElementById("forecastContainer").style.display = "none";
716254ccbcc0 Fixed 2046: WRTKit help topics. Fixed 2170: Added support for Web Developer Library. Fixed 1952: Event Trigger icons unreadable
tasneems@symbian.org
parents:
diff changeset
    78
    document.getElementById("locationsContainer").style.display = "block";
716254ccbcc0 Fixed 2046: WRTKit help topics. Fixed 2170: Added support for Web Developer Library. Fixed 1952: Event Trigger icons unreadable
tasneems@symbian.org
parents:
diff changeset
    79
716254ccbcc0 Fixed 2046: WRTKit help topics. Fixed 2170: Added support for Web Developer Library. Fixed 1952: Event Trigger icons unreadable
tasneems@symbian.org
parents:
diff changeset
    80
    // Restore the default right softkey
716254ccbcc0 Fixed 2046: WRTKit help topics. Fixed 2170: Added support for Web Developer Library. Fixed 1952: Event Trigger icons unreadable
tasneems@symbian.org
parents:
diff changeset
    81
    window.menu.setRightSoftkeyLabel("", null);
716254ccbcc0 Fixed 2046: WRTKit help topics. Fixed 2170: Added support for Web Developer Library. Fixed 1952: Event Trigger icons unreadable
tasneems@symbian.org
parents:
diff changeset
    82
716254ccbcc0 Fixed 2046: WRTKit help topics. Fixed 2170: Added support for Web Developer Library. Fixed 1952: Event Trigger icons unreadable
tasneems@symbian.org
parents:
diff changeset
    83
    // Refresh the view
716254ccbcc0 Fixed 2046: WRTKit help topics. Fixed 2170: Added support for Web Developer Library. Fixed 1952: Event Trigger icons unreadable
tasneems@symbian.org
parents:
diff changeset
    84
    setTimeout("widget.performTransition();", 0);
716254ccbcc0 Fixed 2046: WRTKit help topics. Fixed 2170: Added support for Web Developer Library. Fixed 1952: Event Trigger icons unreadable
tasneems@symbian.org
parents:
diff changeset
    85
}</pre></li>
716254ccbcc0 Fixed 2046: WRTKit help topics. Fixed 2170: Added support for Web Developer Library. Fixed 1952: Event Trigger icons unreadable
tasneems@symbian.org
parents:
diff changeset
    86
</ol></div>
716254ccbcc0 Fixed 2046: WRTKit help topics. Fixed 2170: Added support for Web Developer Library. Fixed 1952: Event Trigger icons unreadable
tasneems@symbian.org
parents:
diff changeset
    87
<div><h3>To use softkeys to change views</h3><p>Enable softkeys and add options to the <span class="uicontrol">Options</span> menu to change views, as instructed in <a href="GUID-94946735-D23B-49C6-BB65-8BE31737AE42.html#GUID-94946735-D23B-49C6-BB65-8BE31737AE42">Using softkeys</a>.</p><p>For an example, see <a href="GUID-EED2A703-672F-4723-87AE-26EA53C7E9E6.html#GUID-EED2A703-672F-4723-87AE-26EA53C7E9E6">STEW: adding menu options</a>.</p></div>
716254ccbcc0 Fixed 2046: WRTKit help topics. Fixed 2170: Added support for Web Developer Library. Fixed 1952: Event Trigger icons unreadable
tasneems@symbian.org
parents:
diff changeset
    88
<div><h3>To use links to change views</h3><p>If you specify a link to open a URI on the Internet, the new HTML page is loaded so that it replaces the widget main page and there is no way to return to the widget. Therefore, you should use the <a href="GUID-EFCCE3CA-A1D2-4CD0-8D10-BD6320B19E5A.html#GUID-EFCCE3CA-A1D2-4CD0-8D10-BD6320B19E5A"><code>openURL()</code></a> method of the <code>widget</code> object to open the specified link in the Web Browser for S60 in stand-alone mode. The widget remains open but is sent to the background.</p><pre class="codeblock">&lt;a onclick="javascript:widget.openURL(http://www.forum.nokia.com)"&gt;Open Forum Nokia&lt;/a&gt;</pre></div>
716254ccbcc0 Fixed 2046: WRTKit help topics. Fixed 2170: Added support for Web Developer Library. Fixed 1952: Event Trigger icons unreadable
tasneems@symbian.org
parents:
diff changeset
    89
</div></div></div><div class="footer"><hr/><div class="copy">© Nokia 2009.</div></div></body></html>