.. _dojox/form/Rating: dojox.widget.Rating =================== :Status: Draft :Version: 1.0 :Authors: Wolfram Kriesing :Developers: Wolfram Kriesing :Available: since V1.2 .. contents:: :depth: 2 This widget allows users to rate items. ===== Usage ===== By default it shows three stars. The star images are provided with dojox. This is a form widget, which means that you can simply embed it inside a dojo form, which submits the value automatically too. But it doesn't require to be inside a form. ======== Examples ======== Quick Start ----------- The following example shows how the default widget works. Make it work by Now you are set and the rating widget should render and be useable. .. codeviewer::
You can **reset the number of stars to 0** by clicking on the currently selected star. For example, if two stars are currently selected click on the second star again and no star will be selected. Standard options ---------------- This example shows how to use additional attributes to customize the widget. The attribute ``numStars="10"`` tells the widget to show ten stars, ``value="4"`` sets the initially selected number of stars. .. codeviewer:: Events via inline script ------------------------ The following shows what events you can connect to and how to do this using inline script blocks. .. codeviewer::
The value is: 0
The mouse is over: 0
The value is: 0
The mouse is over: 0