I am tring to add data to a listbox in javascript, however the string building syntax has me stumped:
var yourobject = '<%=Model.Inserts['+ i + ']%>';
causes an error: "Too many characters in character literal"
All of the code:
var mlb = cm.createListBox('mylistbox', {
title: 'My list box',
onselect: function(v) {
tinyMCE.activeEditor.windowManager.alert('Value selected:' + v);
}
});
for (var i = 0; i < '<%=Model.Inserts.Count() %>'; i++) {
var yourobject = '<%=Model.Inserts['+ i + ']%>';
mlb.add(yourobject, i);
}