|
|
(8 intermediate revisions by the same user not shown) |
Line 2: |
Line 2: |
|
| |
|
| == Description == | | == Description == |
| The jqxCheckBox widget displays a check box that allows the end-user to select a true, false or indeterminate condition. | | The jqxCheckBox widget displays a check box that allows the end-user to select a true, false or indeterminate condition. |
| | |
| | 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. |
| | |
| | To change the title of an item at runtime, use textContent: |
| | <pre> |
| | xcbAMEX.childNodes[1].textContent = "American Express" |
| | </pre> |
|
| |
|
| == 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/jqxcheckandradio/jquery-checkbox-getting-started.htm | | |
| | == Example == |
| | |
| | <tabber> |
| | JavaScript= |
| | <syntaxhighlight lang="JavaScript"> |
| | var thisExchange, value; |
| | thisExchange = ""; |
|
| |
|
| == Example (Basic) == | | xcbNYSE.onchecked = function() { |
| | thisExchange = "Y"; |
| | NSB.MsgBox("You chose the New York Stock Exchange!"); |
| | }; |
|
| |
|
| <pre>
| | xcbNASDAQ.onchecked = function() { |
| Dim countries
| | NSB.MsgBox("You chose the Nasdaq Stock Exchange!"); |
| countries = Array("Afghanistan", "Albania", "Algeria", "Andorra", "Angola", "Antarctica", _
| | }; |
| "Antigua and Barbuda", "Argentina", "Armenia", "Australia", "Austria")
| |
|
| |
|
| Function setInput()
| | xcbAMEX.onchecked = function() { |
| $("#ipSymbol").jqxInput({ placeHolder: "Enter a country.", minLength: 2, source: countries, items: 6 });
| | value = $("#xcbAMEX").jqxCheckBox("val"); |
| End Function
| | if (value == true) { |
| | NSB.MsgBox("You chose the American Stock Exchange!"); |
| | } |
| | }; |
|
| |
|
| </pre> | | Button1.onclick = function() { |
| | $("#xcbNYSE").jqxCheckBox("uncheck"); |
| | $("#xcbNASDAQ").jqxCheckBox("uncheck"); |
| | $("#xcbAMEX").jqxCheckBox("uncheck"); |
| | thisExchange = ""; |
| | }; |
| | </syntaxhighlight> |
| | |-| |
| | BASIC= |
| | <syntaxhighlight lang="vb.net"> |
| | Dim thisExchange, value |
| | thisExchange="" |
|
| |
|
| == Example (JavaScript) == | | Function xcbNYSE_onchecked() |
| | thisExchange="Y" |
| | MsgBox("You chose the New York Stock Exchange!") |
| | End Function |
|
| |
|
| <pre>
| | Function xcbNASDAQ_onchecked() |
| var countries;
| | MsgBox("You chose the Nasdaq Stock Exchange!") |
| countries = new Array("Afghanistan", "Albania", "Algeria", "Andorra", "Angola", "Antarctica", _
| | End Function |
| "Antigua and Barbuda", "Argentina", "Armenia", "Australia", "Austria"); | |
|
| |
|
| function setInput() {
| | Function xcbAMEX_onchecked() |
| $("#ipSymbol").jqxInput({ placeHolder: "Enter a country.", minLength: 2, source: countries, items: 6 }); | | value = $("#xcbAMEX").jqxCheckBox("val"); |
| }
| | If value=True Then |
| | MsgBox("You chose the American Stock Exchange!") |
| | End If |
| | End Function |
|
| |
|
| </pre> | | Function Button1_onclick() |
| | $("#xcbNYSE").jqxCheckBox("uncheck"); |
| | $("#xcbNASDAQ").jqxCheckBox("uncheck"); |
| | $("#xcbAMEX").jqxCheckBox("uncheck"); |
| | thisExchange="" |
| | End Function |
| | </syntaxhighlight> |
| | </tabber> |
|
| |
|
| == Output == | | == Output == |
|
| |
|
| See above. | | See sample. |
|
| |
|
| [[Category:Language Reference]] | | [[Category:Language Reference]] |
Description
The jqxCheckBox widget displays a check box that allows the end-user to select a true, false or indeterminate condition.
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.
To change the title of an item at runtime, use textContent:
xcbAMEX.childNodes[1].textContent = "American Express"
Properties and Methods
This control is well documented on the jqWidget's website: http://www.jqwidgets.com/jquery-widgets-documentation/.
Example
var thisExchange, value;
thisExchange = "";
xcbNYSE.onchecked = function() {
thisExchange = "Y";
NSB.MsgBox("You chose the New York Stock Exchange!");
};
xcbNASDAQ.onchecked = function() {
NSB.MsgBox("You chose the Nasdaq Stock Exchange!");
};
xcbAMEX.onchecked = function() {
value = $("#xcbAMEX").jqxCheckBox("val");
if (value == true) {
NSB.MsgBox("You chose the American Stock Exchange!");
}
};
Button1.onclick = function() {
$("#xcbNYSE").jqxCheckBox("uncheck");
$("#xcbNASDAQ").jqxCheckBox("uncheck");
$("#xcbAMEX").jqxCheckBox("uncheck");
thisExchange = "";
};
Dim thisExchange, value
thisExchange=""
Function xcbNYSE_onchecked()
thisExchange="Y"
MsgBox("You chose the New York Stock Exchange!")
End Function
Function xcbNASDAQ_onchecked()
MsgBox("You chose the Nasdaq Stock Exchange!")
End Function
Function xcbAMEX_onchecked()
value = $("#xcbAMEX").jqxCheckBox("val");
If value=True Then
MsgBox("You chose the American Stock Exchange!")
End If
End Function
Function Button1_onclick()
$("#xcbNYSE").jqxCheckBox("uncheck");
$("#xcbNASDAQ").jqxCheckBox("uncheck");
$("#xcbAMEX").jqxCheckBox("uncheck");
thisExchange=""
End Function
Output
See sample.