3.0 beta 2

How to give ID to checkbox in CheckedList

Please create one file and put this code inside that file (Your runtime folder and created file should be present in same folder).
<title>ActiveWidgets Examples</title>
<script src="runtime/lib/aw.js"></script>
<link href="runtime/styles/xp/aw.css" rel="stylesheet"></link>
body {font: menu}
p {margin: 10px 0px 5px 0px}
table {font: menu; table-layout: fixed}
<script language="javascript">
function selectlist()
<body class="aw-body">
Checked List:
var obj = new AW.UI.CheckedList;
obj.setItemText(["Home", "Favorites", "Font size", "Search"]);
obj.setItemImage(["home", "favorites", "fontsize", "search"]);
<p> <input type="button" value="Ok" onClick="javascript:selectlist();">
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.
Monday, June 5, 2006
Yes, its posiible with custom item indices -

var obj = new AW.UI.CheckedList;
    obj.setItemText({10:"Home", 20:"Favorites", 30:"Font size", 40:"Search"});
    obj.setItemImage({10:"home", 20:"favorites", 30:"fontsize", 40:"search"});
    obj.setViewIndices([10, 20, 30, 40]);
Alex (ActiveWidgets)
Monday, June 5, 2006

This topic is archived.

Back to support forum


Version 2

Looking for AW 2.6 ?
The old site is here.