HTML : Anyone know how to get a .PDF file to open in a new browser window?.

You've lost me!!??. :p

I've got a .pdf I have uploaded to my server that I need web viewers to be able to open from a website page from a hyperlink, in a new browser window. The way I have it just now either opens it, but not in a new window ( replaces the webpage they were on ) or it opens it in a new window but for some strange reason the webpage it has opened from jumps from that page back to my /index.html page?. :confused:
 
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. :)
 
Back
Top Bottom