JqxInput: Difference between revisions

From NSB App Studio
Jump to navigation Jump to search
(Created page with "File:jqxrating.png == Description == The rating control lets you enter and display a number of stars in a row. It is based on the jqWidgets jqxRating widget. == Properti...")
 
No edit summary
 
(8 intermediate revisions by 2 users not shown)
Line 1: Line 1:
[[File:jqxrating.png]]
[[File:jqxinput.png]]


== 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 Input widget provides suggestions while you type into the field. The datasource is a simple array, provided to the control using the "source" property.
 
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 ==


See the complete documentation at jqWidget's site:
This control is well documented on the jqWidget's website: http://www.jqwidgets.com/jquery-widgets-documentation/.
http://www.jqwidgets.com/jquery-widgets-documentation/documentation/jqxrating/jquery-rating-getting-started.htm


== Example ==
== Example ==


=== Events ===
<tabber>
==== onchange (BASIC) ====
JavaScript=
<pre>
<syntaxhighlight lang="JavaScript">
Function Rating1_onchange(event)
var countries;
  Dim curValue
countries = new Array("Afghanistan", "Albania", "Algeria", "Andorra", "Angola", "Antarctica", _
  curValue = event.value
   "Antigua and Barbuda", "Argentina", "Armenia", "Australia", "Austria");
  Label1.textContent = "Rating Value: " & curValue
End Function
</pre>
 
==== change (JavaScript) ====
<pre>
JavaScript
$('#Rating1').bind('change', function (event)
    {
      var curValue= event.value;
      alert(curValue);
    });
End JavaScript
 
</pre>
 
=== Functions ===
 
==== Disable Rating ====
<pre>
Rem disable rating
Function Button1_onclick()
   $("#Rating1").jqxRating({disabled:True})
End Function
</pre>
 
==== Enable Rating ====
 
<pre>
Rem enable rating
Function Button2_onclick()
  $("#Rating1").jqxRating({disabled:False})
End Function
</pre>


==== Set Rating Value ====
function setInput() {
<pre>
   $("#ipSymbol").jqxInput({ placeHolder: "Enter a country.", minLength: 2, source: countries, items: 6 });
Rem Set rating value 5*
}
Function Button3_onclick()
</syntaxhighlight>
   $("#Rating1").jqxRating({value:5})
|-|
End Function
BASIC=
</pre>
<syntaxhighlight lang="vb.net">
Dim countries
countries = Array("Afghanistan", "Albania", "Algeria", "Andorra", "Angola", "Antarctica", _
  "Antigua and Barbuda", "Argentina", "Armenia", "Australia", "Austria")


==== Get Rating Value ====
Function setInput()
<pre>
   $("#ipSymbol").jqxInput({ placeHolder: "Enter a country.", minLength: 2, source: countries, items: 6 });
Rem Get rating value
Function Button4_onclick()
   Dim curValue
  curValue = $("#Rating1").jqxRating("value")
  MsgBox "Current Value is : " & curValue
End Function
End Function
 
</syntaxhighlight>
</pre>
</tabber>


== Output ==
== Output ==

Latest revision as of 16:32, 24 July 2019

Description

The Input widget provides suggestions while you type into the field. The datasource is a simple array, provided to the control using the "source" property.

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

var countries;
countries = new Array("Afghanistan", "Albania", "Algeria", "Andorra", "Angola", "Antarctica", _
  "Antigua and Barbuda", "Argentina", "Armenia", "Australia", "Austria");

function setInput() {
  $("#ipSymbol").jqxInput({ placeHolder: "Enter a country.", minLength: 2, source: countries, items: 6 });
}

Dim countries
countries = Array("Afghanistan", "Albania", "Algeria", "Andorra", "Angola", "Antarctica", _
  "Antigua and Barbuda", "Argentina", "Armenia", "Australia", "Austria")

Function setInput()
  $("#ipSymbol").jqxInput({ placeHolder: "Enter a country.", minLength: 2, source: countries, items: 6 });
End Function

Output

See above.