Hi,
I'm trying to develop a simple plugin.
When the user clicks the icon for the plugin, they will be show a list of checkboxes. These checkboxes are generated via an SJAX request and the number created will vary:
I then pass this folders array to the contents of a tab in the dialog box.
How can I group these checkboxes together and find out which ones have been checked in the onOk function?
When I try and get the value of 'folders', it just returns true:
Any advice appreciated.
Thanks.
I'm trying to develop a simple plugin.
When the user clicks the icon for the plugin, they will be show a list of checkboxes. These checkboxes are generated via an SJAX request and the number created will vary:
var folders = new Array();
var request = $.ajax({
url: '/folders',
type: "GET",
dataType: "json",
async: false
});
request.done(function(data) {
$.each(data, function(i,item){
folders[i] = {
'type' : 'checkbox',
'id' : 'folders['+i+']',
'label' : item.title
}
});
});
I then pass this folders array to the contents of a tab in the dialog box.
How can I group these checkboxes together and find out which ones have been checked in the onOk function?
When I try and get the value of 'folders', it just returns true:
onOk : function() {
var dialog = this;
alert(dialog.getValueOf( 'tab1', 'folders'));
}
Any advice appreciated.
Thanks.
