org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-AB8ECBA0-FD4B-4A2F-8199-40C7F7CD51AB.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="performTransition()"/><meta name="DC.Relation" scheme="URI" content="GUID-87B333A2-FDA1-4BC3-8803-C5702C5869A1"/><meta name="DC.Relation" scheme="URI" content="GUID-4AE77C0F-577E-4DC7-BC90-40A75C873404"/><meta name="DC.Relation" scheme="URI" content="GUID-7C69DDA4-16F1-4A8F-BDB2-4CB0015B4E81"/><meta name="DC.Relation" scheme="URI" content="GUID-6CD2776F-A868-4280-967F-4EB426212556"/><meta name="DC.Format" content="XHTML"/><meta name="DC.Identifier" content="GUID-AB8ECBA0-FD4B-4A2F-8199-40C7F7CD51AB"/><title>performTransition()  </title><script type="text/javascript">
       
     5       function initPage() {}
       
     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-AB8ECBA0-FD4B-4A2F-8199-40C7F7CD51AB">performTransition() </h1><div>
       
     7 <p><strong>Description:</strong></p>
       
     8 <p>The <code>performTransition</code> method operates as a screen update command, which tells the widget UI framework to update the widget screen. It performs the animation while the widget's view is being changed. Currently, only fading animation mode is supported.</p>
       
     9 <p>The <code>performTransition</code> method is to be called together with the <a href="GUID-4AE77C0F-577E-4DC7-BC90-40A75C873404.html#GUID-4AE77C0F-577E-4DC7-BC90-40A75C873404"><code>prepareForTransition</code></a> method.</p>
       
    10 <p><strong>Syntax:</strong></p>
       
    11 <pre class="codeblock" id="GUID-1375494A-4316-48B3-9135-5157C1506253">[void] widget.performTransition(void) </pre>
       
    12 <p>or</p>
       
    13 <pre class="codeblock" id="GUID-0220F2B1-B8DE-439F-B597-BBFEC6915EFA">[void] window.widget.performTransition(void)</pre>
       
    14 <p><strong>Arguments:</strong></p>
       
    15 <p>This method does not take any arguments.</p>
       
    16 <p><strong>Return value:</strong></p>
       
    17 <p>This method does not return a value.</p>
       
    18 <p><strong>Example code:</strong></p>
       
    19 <p><em>Example HTML code</em>:</p>
       
    20 <pre class="codeblock" id="GUID-72003A6C-9259-42B0-868C-1E1DB6A2852A">&lt;!-- Main view --&gt;
       
    21 &lt;div id='main'&gt;
       
    22   Hello World!
       
    23   &lt;input type="button" value="Config" onclick="toMain(0);" /&gt;
       
    24 &lt;/div&gt;
       
    25 &lt;!-- Main view ends --&gt;
       
    26 &lt;!-- Config view --&gt;
       
    27 &lt;div id='config'&gt;
       
    28   Your world is my world!
       
    29   &lt;input type="button" value="Main" onclick="toMain(1);" /&gt;
       
    30 &lt;/div&gt;
       
    31 &lt;!-- Settings view ends --&gt;</pre>
       
    32 <p><em>Example JavaScript code</em>:</p>
       
    33 <pre class="codeblock" id="GUID-2E747FD8-E852-43E7-B038-72736855FB76">function toMain(main) {
       
    34   // preparing for Transition
       
    35   widget.prepareForTransition("fade");
       
    36   if (main) { // switching from config view to the main view
       
    37     // hide config view
       
    38     document.getElementById("config").style.display = 'none';
       
    39     // show main view
       
    40     document.getElementById("main").style.display = 'block';
       
    41     }
       
    42   else {  // switching from main view to config view
       
    43     // hide main view
       
    44     document.getElementById("main").style.display = 'none';
       
    45     // show config view
       
    46     document.getElementById("config").style.display = 'block';
       
    47     }
       
    48   // do the Transition to make the fade effect
       
    49   widget.performTransition();
       
    50 }</pre>
       
    51 </div></div></div><div class="footer"><hr/><div class="copy">© Nokia 2009.</div></div></body></html>