summaryrefslogtreecommitdiff
path: root/media/javascript/core/form/examples/selectField.html
blob: 7138a5f66c8a8fc38fb130be7c8550c2a49ee68a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html>
<head>
	<title>BlueShoes JavaScript: Bs_FormFieldSelect example</title>

<script type="text/javascript" src="/_bsJavascript/core/form/Bs_FormFieldSelect.class.js"></script>
<script>
function init() {
  myField = document.getElementById('foo')
  var t = new Bs_FormFieldSelect();
  t.init(myField);
}
</script>

</head>

<body onLoad="init();">

<form name="myForm">
  <select name="foo" id="foo" size="10" multiple style="font-family:courier,lucida console;">
    <option value="b">bb</option>
    <option value="d">dddd</option>
    <option value="a">a</option>
    <option value="e">eeeee</option>
    <option value="g">ggggggg</option>
    <option value="c">ccc</option>
    <option value="f">ffffff</option>
  </select>
</form>

<button name="sort" onClick="myField.sortByText();">Sort Asc</button>
<button name="sort" onClick="myField.sortByText(true);">Sort Desc</button>

</body>
</html>