JqxRating: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
|||
(6 intermediate revisions by 2 users not shown) | |||
Line 3: | Line 3: | ||
== Description == | == Description == | ||
The rating control lets you enter and display a number of stars in a row. It is based on the jqWidgets jqxRating widget. | The rating control lets you enter and display a number of stars in a row. It is based on the jqWidgets jqxRating widget. | ||
jqWidgets is a commercial product, which depending on how you use it, requires a license fee. Complete details are on jqWidget's website. The product is well supported. | |||
== Properties and Methods == | == Properties and Methods == | ||
This control is well documented on the jqWidget's website: http://www.jqwidgets.com/jquery-widgets-documentation/. | |||
http://www.jqwidgets.com/jquery-widgets-documentation/ | |||
== Example == | == Example == | ||
Events | === Events === | ||
==== onchange (BASIC) ==== | |||
<pre> | <pre> | ||
Function Rating1_onchange(event) | Function Rating1_onchange(event) | ||
Line 19: | Line 21: | ||
End Function | End Function | ||
</pre> | </pre> | ||
Functions | |||
==== change (JavaScript) ==== | |||
<pre> | |||
JavaScript | |||
$('#Rating1').bind('change', function (event) | |||
{ | |||
var curValue= event.value; | |||
alert(curValue); | |||
}); | |||
End JavaScript | |||
</pre> | |||
=== Functions === | |||
==== Disable Rating ==== | |||
<pre> | <pre> | ||
Rem disable rating | Rem disable rating | ||
Line 25: | Line 42: | ||
$("#Rating1").jqxRating({disabled:True}) | $("#Rating1").jqxRating({disabled:True}) | ||
End Function | End Function | ||
</pre> | |||
==== Enable Rating ==== | |||
<pre> | |||
Rem enable rating | Rem enable rating | ||
Function Button2_onclick() | Function Button2_onclick() | ||
$("#Rating1").jqxRating({disabled:False}) | $("#Rating1").jqxRating({disabled:False}) | ||
End Function | End Function | ||
</pre> | |||
==== Set Rating Value ==== | |||
<pre> | |||
Rem Set rating value 5* | Rem Set rating value 5* | ||
Function Button3_onclick() | Function Button3_onclick() | ||
$("#Rating1").jqxRating({value:5}) | $("#Rating1").jqxRating({value:5}) | ||
End Function | End Function | ||
</pre> | |||
==== Get Rating Value ==== | |||
<pre> | |||
Rem Get rating value | Rem Get rating value | ||
Function Button4_onclick() | Function Button4_onclick() | ||
Line 42: | Line 69: | ||
MsgBox "Current Value is : " & curValue | MsgBox "Current Value is : " & curValue | ||
End Function | End Function | ||
</pre> | </pre> |
Latest revision as of 17:19, 7 April 2016
Description
The rating control lets you enter and display a number of stars in a row. It is based on the jqWidgets jqxRating widget.
jqWidgets is a commercial product, which depending on how you use it, requires a license fee. Complete details are on jqWidget's website. The product is well supported.
Properties and Methods
This control is well documented on the jqWidget's website: http://www.jqwidgets.com/jquery-widgets-documentation/.
Example
Events
onchange (BASIC)
Function Rating1_onchange(event) Dim curValue curValue = event.value Label1.textContent = "Rating Value: " & curValue End Function
change (JavaScript)
JavaScript $('#Rating1').bind('change', function (event) { var curValue= event.value; alert(curValue); }); End JavaScript
Functions
Disable Rating
Rem disable rating Function Button1_onclick() $("#Rating1").jqxRating({disabled:True}) End Function
Enable Rating
Rem enable rating Function Button2_onclick() $("#Rating1").jqxRating({disabled:False}) End Function
Set Rating Value
Rem Set rating value 5* Function Button3_onclick() $("#Rating1").jqxRating({value:5}) End Function
Get Rating Value
Rem Get rating value Function Button4_onclick() Dim curValue curValue = $("#Rating1").jqxRating("value") MsgBox "Current Value is : " & curValue End Function
Output
See above.