Authors:Wolfram Kriesing
Developers:Wolfram Kriesing
Available:since V1.2

This widget allows users to rate items.


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.


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.

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.

Events via inline script

The following shows what events you can connect to and how to do this using inline script blocks.

Events via dojo.connect()

The next example shows how you can do the same as above, just using the default connect methods, which is the most common way and probably fits best when working in big projects and when you need a separation of markup and JavaScript source code.

Inside a dojo form

Customized stars

Error in the documentation? Can’t find what you are looking for? Let us know!