plugins/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-B584CA90-543B-4AED-B134-A3A616259DB9.html
changeset 470 d4809db37847
parent 229 716254ccbcc0
equal deleted inserted replaced
469:4d198a32ac7d 470:d4809db37847
       
     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 console"/><meta name="DC.Relation" scheme="URI" content="GUID-2A74FA05-A13B-4133-8E1A-03152B6B1499"/><meta name="DC.Relation" scheme="URI" content="GUID-1EFD7043-E9B8-4B4E-9EA6-A20B3EECC14A"/><meta name="DC.Format" content="XHTML"/><meta name="DC.Identifier" content="GUID-B584CA90-543B-4AED-B134-A3A616259DB9"/><title>JavaScript
       
     5 console </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-B584CA90-543B-4AED-B134-A3A616259DB9">JavaScript
       
     8 console</h1><div>
       
     9 <p>All modern desktop browsers provide features to support developers debugging
       
    10 JavaScript.  While the browsers do not directly integrate true debugging support,
       
    11 they usually support directing JavaScript error messages and logging statements
       
    12 to either a console display or popup messages. Mozilla Firefox supports this
       
    13 feature.</p>
       
    14 <p>Consider the following trivial example of a web page with a JavaScript
       
    15 error.  It calls the method <code>document.writex()</code> which does
       
    16 not exist.</p>
       
    17 <pre class="codeblock" id="GUID-211D95D2-CA00-4EF4-9AC0-8943EEC6EA38">&lt;html&gt;
       
    18 &lt;body&gt;
       
    19 &lt;script language = "JavaScript"&gt;
       
    20 document.write('Testing1&lt;br/&gt;\n');
       
    21 document.writex('Testing2&lt;br&gt;\n');
       
    22 &lt;/script&gt;
       
    23 Test Page
       
    24 &lt;/body&gt;
       
    25 &lt;/html&gt;
       
    26 </pre>
       
    27 <ul>
       
    28 <li><p>SETTINGS</p></li>
       
    29 </ul>
       
    30 <p>Go to <strong> Web &gt; Settings &gt; General</strong> and select the following option</p>
       
    31 <p> •	Java/ECMA Script </p>
       
    32 <p>This option provides you support to enable/disable JavaScript.</p>
       
    33 <div class="figure" id="GUID-A03C42D5-8BE6-4322-B116-B369BD9A976D"><img src="GUID-90ECCB11-41D3-4022-9DC0-F3770195F7FE_d0e10560_href.png"/></div>
       
    34 <div class="tablenoborder"><a name="GUID-3BF9531A-3083-42C2-B550-78A95AA96793"><!----></a><table cellpadding="4" cellspacing="0" summary="" id="GUID-3BF9531A-3083-42C2-B550-78A95AA96793" frame="border" border="1" rules="all">
       
    35 <tbody>
       
    36 <tr class="">
       
    37 <td class="cellrowborder" valign="top">
       
    38 <p><strong>Enable</strong></p>
       
    39 </td>
       
    40 <td class="cellrowborder" valign="top">
       
    41 <p>Enable JavaScript Console Support</p>
       
    42 </td>
       
    43 </tr>
       
    44 <tr class="bg ">
       
    45 <td class="cellrowborder" valign="top">
       
    46 <p><strong>Disable</strong></p>
       
    47 </td>
       
    48 <td class="cellrowborder" valign="top">
       
    49 <p>Disable JavaScript Console Support</p>
       
    50 </td>
       
    51 </tr>
       
    52 </tbody>
       
    53 </table></div>
       
    54 <p>•	Java/ECMA Script errors </p>
       
    55 <p>This option provides you choices to display and log errors.</p>
       
    56 <div class="figure" id="GUID-5300E803-3565-4664-A98B-AB64C9D063C1"><div><img src="GUID-6C793265-794B-49DB-BB14-B1D1F5F0CF6C_d0e10613_href.png" style="display: block"/></div></div>
       
    57 <div class="tablenoborder"><a name="GUID-8993D51E-F5AD-4EB2-AE60-2BA5FC0A0937"><!----></a><table cellpadding="4" cellspacing="0" summary="" id="GUID-8993D51E-F5AD-4EB2-AE60-2BA5FC0A0937" frame="border" border="1" rules="all">
       
    58 <tbody>
       
    59 <tr class="">
       
    60 <td class="cellrowborder" valign="top">
       
    61 <p><strong>No Notification</strong></p>
       
    62 </td>
       
    63 <td class="cellrowborder" valign="top">
       
    64 <p>Enable JavaScript Console Support</p>
       
    65 </td>
       
    66 </tr>
       
    67 <tr class="bg ">
       
    68 <td class="cellrowborder" valign="top">
       
    69 <p><strong>Create Log file</strong></p>
       
    70 </td>
       
    71 <td class="cellrowborder" valign="top">
       
    72 <p>It will create log file to the <code>C:\Data</code> folder of SDK</p>
       
    73 </td>
       
    74 </tr>
       
    75 <tr class="">
       
    76 <td class="cellrowborder" valign="top">
       
    77 <p><strong>Show pop-up notes</strong></p>
       
    78 </td>
       
    79 <td class="cellrowborder" valign="top">
       
    80 <p>It will show pop-up notes on the emulator screen</p>
       
    81 </td>
       
    82 </tr>
       
    83 <tr class="bg ">
       
    84 <td class="cellrowborder" valign="top">
       
    85 <p><strong>Log and pop-up notes</strong></p>
       
    86 </td>
       
    87 <td class="cellrowborder" valign="top">
       
    88 <p>It will show pop-up notes and create logs to <code>C:\Data</code> folder
       
    89 of the SDK</p>
       
    90 </td>
       
    91 </tr>
       
    92 </tbody>
       
    93 </table></div>
       
    94 <ul>
       
    95 <li><p>ERROR SCENARIO </p></li>
       
    96 </ul>
       
    97 <p>Try to run the JavaScript example that has an error. Just like an ordinary
       
    98 browser, it will display error message based on your selected criteria from
       
    99 the web settings.</p>
       
   100 <div class="figure" id="GUID-7AAA0735-CB62-4890-8D76-19A47A799E9E"><div><img src="GUID-A063B243-A746-4E10-8787-A08CD8818118_d0e10708_href.png" style="display: block"/></div></div>
       
   101 <ul>
       
   102 <li><p>HOW TO USE</p></li>
       
   103 </ul>
       
   104 <p>Below is the functional description of how this feature can be used.</p>
       
   105 <ol>
       
   106 <li id="GUID-7A345BE8-057D-414C-A539-7FB378396FD1"><a name="GUID-7A345BE8-057D-414C-A539-7FB378396FD1"><!----></a><p> An option
       
   107 for JavaScript console is added to the Browser settings. There are three options
       
   108 for this setting: <strong>Disable</strong>, <strong>Prompt</strong> and <strong>Log</strong>.</p>
       
   109 <ul>
       
   110 <li><p>	When the <strong>Disable</strong> option is selected, the JavaScript
       
   111 console for browser / widgets are disabled.</p></li>
       
   112 <li><p>When the <strong>Prompt</strong> option is selected, JavaScript errors
       
   113 and exceptions are presented in a popup dialog</p></li>
       
   114 <li><p>When the <strong>Log</strong> option is selected, JavaScript errors
       
   115 and exceptions are logged into a text file that is placed in a user accessible
       
   116 area of the device’s file system. For example, <code>C:\data</code></p>
       
   117 </li>
       
   118 </ul>
       
   119 </li>
       
   120 <li id="GUID-75FA73E5-7A82-46B1-8325-67A89952286B"><a name="GUID-75FA73E5-7A82-46B1-8325-67A89952286B"><!----></a><p>JavaScript
       
   121 console supports <code>console.log</code> for logging messages to the
       
   122 console</p></li>
       
   123 </ol>
       
   124 </div></div></div><div class="footer"><hr/><div class="copy">© Nokia 2009.</div></div></body></html>