diff -r 913c9751c067 -r 716254ccbcc0 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/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-A942935B-ACF6-451C-8383-874BEEC52F1A.html Fri Mar 05 19:11:15 2010 -0800 @@ -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).