Hey,
I have a problem with web database development. On the top of a view there’s a button.
This button calls the javascript script at the body’s formulary. The trouble is: the field is checkbox type.
When I check 1 option, the script runs and delete all documents that contains that choice. When I check 2 or more options, the script delete fews selected documents. The others which was selected stills at the formulary.
I think that the problem is at javascript code… Maybe I’m wrong. ![]()
Can you help me to solve this pluzze? Thanks in advance.
Here’s the Javascript Code.
This function is called by “Delete documents” button.
function ExcluirSelecionados() {
msg = "Confirma a exclusão dos itens selecionados?";
if (!(confirm(msg))) {
return;
}
//_SelectMarkForDelete();
var form = document._DominoForm;
for (var i = 0; i < form.elements.length; i++) {
if (form.elements[i].type == "checkbox") {
if (form.elements[i].name == "$$SelectDoc") {
if (form.elements[i].checked) {
document.frames[0].location = path +"/$All/" + form.elements[i].value + "?DeleteDocument";
document.all[0].style.cursor = 'wait';
setTimeout('window.location.reload()', 3000);
}
}
}
}
}