1 | <!doctype html> |
---|
2 | <html lang="en"> |
---|
3 | <head> |
---|
4 | <title>ComboBox - Dynamic Data</title> |
---|
5 | <meta charset="utf-8" /> |
---|
6 | <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" /> |
---|
7 | <meta name="description" content="%description%" /> |
---|
8 | <meta name="keywords" content="" /> |
---|
9 | <meta name="author" content="ComponentOne" /> |
---|
10 | |
---|
11 | <link href="../../themes/rocket/jquery-wijmo.css" rel="stylesheet" type="text/css" /> |
---|
12 | |
---|
13 | <script src="../../external/jquery-1.8.0.min.js" type="text/javascript"></script> |
---|
14 | <script src="../../external/jquery-ui-1.8.23.custom.min.js" type="text/javascript"></script> |
---|
15 | <link href="../../themes/wijmo/jquery.wijmo-open.2.2.2.css" rel="stylesheet" type="text/css" /> |
---|
16 | <link href="../../themes/wijmo/jquery.wijmo.wijcombobox.css" rel="stylesheet" type="text/css" /> |
---|
17 | <script src="../../external/jquery.mousewheel.min.js" type="text/javascript"></script> |
---|
18 | <script src="../../external/jquery.wijmo-open.all.2.2.2.min.js" type="text/javascript"></script> |
---|
19 | <script src="../../wijmo/jquery.wijmo.wijcombobox.js" type="text/javascript"></script> |
---|
20 | <script id="scriptInit" type="text/javascript"> |
---|
21 | $(document).ready(function () { |
---|
22 | $("#tags").wijcombobox({ |
---|
23 | data: [ |
---|
24 | { |
---|
25 | label: 'c++', |
---|
26 | value: 'c++' |
---|
27 | }, |
---|
28 | { |
---|
29 | label: 'java', |
---|
30 | value: 'java' |
---|
31 | }, |
---|
32 | { |
---|
33 | label: 'php', |
---|
34 | value: 'php' |
---|
35 | }, |
---|
36 | { |
---|
37 | label: 'coldfusion', |
---|
38 | value: 'coldfusion' |
---|
39 | }, { |
---|
40 | label: 'javascript', |
---|
41 | value: 'javascript' |
---|
42 | }, |
---|
43 | { |
---|
44 | label: 'asp', |
---|
45 | value: 'asp' |
---|
46 | }, |
---|
47 | { |
---|
48 | label: 'ruby', |
---|
49 | value: 'ruby' |
---|
50 | }, |
---|
51 | { |
---|
52 | label: 'python', |
---|
53 | value: 'python' |
---|
54 | }, |
---|
55 | { |
---|
56 | label: 'c', |
---|
57 | value: 'c' |
---|
58 | }, |
---|
59 | { |
---|
60 | label: 'scala', |
---|
61 | value: 'scala' |
---|
62 | }, |
---|
63 | { |
---|
64 | label: 'groovy', |
---|
65 | value: 'groovy' |
---|
66 | }, |
---|
67 | { |
---|
68 | label: 'haskell', |
---|
69 | value: 'haskell' |
---|
70 | }, |
---|
71 | { |
---|
72 | label: 'perl', |
---|
73 | value: 'perl' |
---|
74 | } |
---|
75 | ] |
---|
76 | }); |
---|
77 | }); |
---|
78 | |
---|
79 | function setData() { |
---|
80 | $("#tags").wijcombobox("option", "data", [ |
---|
81 | { |
---|
82 | label: 'delphi', |
---|
83 | value: 'delphi' |
---|
84 | }, |
---|
85 | { |
---|
86 | label: 'visual studio', |
---|
87 | value: 'visual studio' |
---|
88 | }, |
---|
89 | { |
---|
90 | label: 'flash', |
---|
91 | value: 'flash' |
---|
92 | } |
---|
93 | ]); |
---|
94 | } |
---|
95 | |
---|
96 | </script> |
---|
97 | </head> |
---|
98 | <body class="demo-single"> |
---|
99 | <div class="container"> |
---|
100 | <div class="header"> |
---|
101 | <h2> |
---|
102 | Remote Data</h2> |
---|
103 | </div> |
---|
104 | <div class="main demo"> |
---|
105 | <!-- Begin demo markup --> |
---|
106 | <input id="tags" style="width: 300px" /> |
---|
107 | <!-- End demo markup --> |
---|
108 | <div class="demo-options"> |
---|
109 | <!-- Begin options markup --> |
---|
110 | <input type="button" value="Set Dynamic Data " onclick="setData()" /> |
---|
111 | <!-- End options markup --> |
---|
112 | </div> |
---|
113 | </div> |
---|
114 | <div class="footer demo-description"> |
---|
115 | <p> |
---|
116 | This sample shows how to add dynamical data to the combobox. |
---|
117 | </p> |
---|
118 | </div> |
---|
119 | </div> |
---|
120 | </body> |
---|
121 | </html> |
---|