I have such a for loop:
for (var i = 0; i < documentsCount; i++) {
var e = checkBoxes[i];
if (e.checked) {
var documentType = documents[i].value;
if ("ConcreteType_1" == documentType) {
makeAction();
} else {
if (attachmentCount > 0) {
downloadDoc();
}
}
}
}
The downloadDoc() function opens an iframe for each file (that has attachemnts and is not of ‘ConcreteType_1’ type) and the makeAction() function opens a new tab to preview the file source. If I check several files with attachments, everything is fine – several download boxes are raised, but if there is at least one file of ‘ConcreteType_1’ type among files with attachments, a new tab opens and no download boxes are raised…
If somebody knows how to deal with it, please share.
Sorry for disturbing you. The problem was local. There was a script that cleared all the checked boxes after a new tab had opened.