:: Forum >>

Activewidgets combobox and mootools

The elements of the combobox will not show in IE7 if the mootools API is loaded. The problem appears to be the way mootools handles arrays.
The problem is not found in IE8, FF or Chrome.

I've found the following workaround:

<script>
var combo = new AW.UI.Combo;
//var cprsArr = ['A','B','C']; // Note: Does not work
var cprsArr = {0:'A',1:'B',2:'C'}; // Workaround
combo.setId("testcb");
combo.setControlText("A");
combo.setItemText(cprsArr);
combo.setItemValue(cprsArr);
combo.setItemCount(3);
combo.onControlValidated = function(text) { alert(text); };
document.write(combo);
</script>
Benjamin
Friday, February 25, 2011

This topic is archived.


Back to support forum

Forum search