widget:script

Purpose

Contains a script that can be executed by the invoke action.

Contained by

Attribute groups

Action

Action Description
invoke Invokes the script

Example

<?xml version="1.0" encoding="UTF-8"?>
<html xmlns="http://www.w3.org/2002/06/xhtml2"
  xmlns:widget="http://www.volantis.com/xmlns/2006/05/widget">
  <head>
    <title>widget:script</title>
    <style type="text/css">
      widget|progress {
        color: #23516a;
        height: 1em;
        padding: 2px;
      }
    </style>
    <widget:script id="progress"> $W('progressBar').progress(15); </widget:script>
    <widget:script id="reset"> $W('progressBar').reset() </widget:script>
  </head>
  <body id="body">
    <widget:progress id="progressBar"/>
    <div>
      <widget:button action="progress#invoke">progress</widget:button>
      <widget:button action="reset#invoke">reset</widget:button>
    </div>
  </body>
</html>

Related topics