Newly Opened Tab kills Function Calls
<p>I have such a for loop:</p>

<pre><code>for (var i = 0; i &lt; documentsCount; i++) {
    var e = checkBoxes[i];
    if (e.checked) {
        var documentType = documents[i].value;
        if ("ConcreteType_1" == documentType) {
            makeAction();
        } else {
            if (attachmentCount &gt; 0) {
                downloadDoc();
            }
        }
    }
} 
</code></pre>

<p>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...</p>

<p>If somebody knows how to deal with it, please share.</p>
