I have a anchor tag as follows:-
<a id="lnkAvailabilityBrochure" href="" style="visibility:hidden" download></a>
and the click event of a div is bound to the following method that simulates clicking the above hyperlink:-
var downloadPropertyBrochure = function () {
if (propertyBrochure.BrochureId != EmptyGuid){
$("#lnkPropertyBrochure").attr("href", propertyBrochure.ViewUrl);
$("#lnkPropertyBrochure")[0].click();
}
else
{
$.growlUI("There is no brochure to download..");
}
}
This works just fine in chrome and also in IE 11 it opens the download but IN THE SAME WINDOW !! How can I prevent this. How can I force download and not allow to open in the same page. Any ideas ?