This page is an example of how to register an observer object on a Spry Rating widget to allow some additional processing after the user clicks on the widget to vote. It requires PHP scripting enabled on the server.
The sample shows how to "connect" two Rating widgets using the observers mechanism.
The first Rating widget (from left side) allows you to vote and the second one is in read only mode. After the user votes on the first widget, the voted value is sent to the server and a notification is sent to the second widget, informing it that the first widget is in voted state. The second Rating widget will update it's value based on the server response. (We have an alert message that will display the server response value which is the current rated value minus one).
Give your rate:
|
Server returned value (widget in read-only mode):
|