How to give ID to checkbox in CheckedList
Hi,
Please create one file and put this code inside that file (Your runtime folder and created file should be present in same folder).
<html>
<head>
<title>ActiveWidgets Examples</title>
<script src="runtime/lib/aw.js"></script>
<link href="runtime/styles/xp/aw.css" rel="stylesheet"></link>
<style>
body {font: menu}
p {margin: 10px 0px 5px 0px}
table {font: menu; table-layout: fixed}
</style>
<script language="javascript">
function selectlist()
{
alert(obj.getSelectedItems());
}
</script>
</head>
<body class="aw-body">
<p>
Checked List:
</p>
<script>
var obj = new AW.UI.CheckedList;
obj.setItemText(["Home", "Favorites", "Font size", "Search"]);
obj.setItemImage(["home", "favorites", "fontsize", "search"]);
obj.setItemCount(4);
document.write(obj);
</script>
<p> <input type="button" value="Ok" onClick="javascript:selectlist();">
</p>
</body>
</html>
Now select first checkbox and click on 'Ok' button you will get output as 0 . Now select first and second checkbox and click on 'Ok' you will get 0,1 as output.
I want to give an id to each checkbox such as 10,20 etc. So that when i select first and second checkbox it should produced output 10,20.
Please create one file and put this code inside that file (Your runtime folder and created file should be present in same folder).
<html>
<head>
<title>ActiveWidgets Examples</title>
<script src="runtime/lib/aw.js"></script>
<link href="runtime/styles/xp/aw.css" rel="stylesheet"></link>
<style>
body {font: menu}
p {margin: 10px 0px 5px 0px}
table {font: menu; table-layout: fixed}
</style>
<script language="javascript">
function selectlist()
{
alert(obj.getSelectedItems());
}
</script>
</head>
<body class="aw-body">
<p>
Checked List:
</p>
<script>
var obj = new AW.UI.CheckedList;
obj.setItemText(["Home", "Favorites", "Font size", "Search"]);
obj.setItemImage(["home", "favorites", "fontsize", "search"]);
obj.setItemCount(4);
document.write(obj);
</script>
<p> <input type="button" value="Ok" onClick="javascript:selectlist();">
</p>
</body>
</html>
Now select first checkbox and click on 'Ok' button you will get output as 0 . Now select first and second checkbox and click on 'Ok' you will get 0,1 as output.
I want to give an id to each checkbox such as 10,20 etc. So that when i select first and second checkbox it should produced output 10,20.
Vivek
June 5,