Dictionary value iterator
<html>
<head>
<script type="text/javascript">
var djConfig = {
baseScriptUri : "js/dojo/",
parseOnLoad : true
};
</script>
<script type="text/javascript" src="js/dojo/dojo/dojo.js"></script>
<script>
dojo.require("dojox.collections.Dictionary");
function testIt() {
var dy = new dojox.collections.Dictionary();
dy.add("A", "a");
dy.add("B", "b");
dy.add("Q", "q");
dy.add("R", "r");
var vals = dy.getValueList();
for (var i = 0; i < vals.length; i++) {
alert( vals[i]);
}
}
</script>
</head>
<body onLoad="testIt();">
</body>
</html>
Dojo-toolkit.zip( 3,849 k)Related examples in the same category