diff -r 4d198a32ac7d -r d4809db37847 plugins/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-A942935B-ACF6-451C-8383-874BEEC52F1A.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/plugins/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-A942935B-ACF6-451C-8383-874BEEC52F1A.html Thu Aug 19 17:48:04 2010 -0700 @@ -0,0 +1,18 @@ + + +
It is recommended that you create a separate JavaScript (js
)
+file for implementing the widget UI interaction and other operations. This
+increases clarity of the code and enables reuse of the code in other widgets.
+A widget can have as many JavaScript files as needed.
There are two ways to use an external JavaScript file through the widget's main +HTML file:
Specifying a JavaScript file that is included in the widget +package
Use the <script>
tag as follows:
<script type='text/JavaScript' src='JavaScript.js'></script>
Specifying a JavaScript file that is stored in a remote location
In this case, the JavaScript file is not included in the widget package.
+Specify the full URL of the JavaScript source in the src
attribute
+of the script
tag as follows:
<script type='text/JavaScript' src='http://www.widget.server/JavaScript.js'></script>
Note: When linking to external JavaScript files in a remote location, specify
+the AllowNetworkAccess
key in the info.plist
file as true
to allow the widget to connect to the network.
For more information on JavaScript, see the Web +Runtime API reference and the JavaScript +Tutorial published by the World Wide Web Consortium (W3C).