As above, my brain isn't working this morning at all.![]()
cant you just link directly to the PDF?
or will that prompt a OPEN SAVE AS?
Have you tried
Code:<a href="pdfurl.pdf" target="_blank">Link</a>
That's all you should need
Yeah, that works, ta. I was kinda trying to avoid using "target" as its deprecated but I'm not that fussed, my doctype is Transitional anyhow.
Thanks, Jonny_no2.![]()
Cheers folks, top stuff. I'll look into the .js method, "target" will do fine for now.
Thanks for the info guys.![]()
This is the method I use. It relies on jQuery, but 99% of the sites I create have it anyway.Just use <a href="whatever.pdf" onclick="window.open(this.href); return false;">
$(function() {
$("a[rel='external']").click(function(e) {
window.open($(this).attr("href"));
e.preventDefault();
});
});
<a href="whatever.pdf" rel="external">Download me</a>