Hi i have been struggle with this code since 1 week now. I cant figure out how i can alert newsArray[i].Title when i push the button for the dialog.
the function SaveUserToList is just a example, i have a lot of code there. The only thing right now is i must get the value from the Title in the newsarray.
for(var i = 0; i< newsArray.length; i++){
$(cloneModalContent).dialog({
resizable: true,
width: "auto",
title: newsArray[i].Title,
modal: true,
buttons: {
Cancel: function() {
$(this).dialog('close');
},
'Confirm': function() {
SaveUserToList();
$(this).dialog('close');
}
});
}
function SaveUserToList(){
alert(newsArray[i].Title);
}