Opening documents such as PDFs in a new window should be automated using JavaScript for the following reasons:
- Users will often close the web browser when a PDF is opened, mistakenly believing the document has been opened in Adobe Reader
- The attribute historically used to open a new window,
target, has been removed from the HTML 4.01 Strict specification (it's now deprecated) - Opening a new window is a behaviour and should be moved to the behavioural layer1.
Using
JavaScript can also be particularly useful when a website is content
managed. Rather than having to rely on site editors to remember to open
a link to a PDF in a new window the process is handled by a simple JavaScript function.
Resources for the new window tutorial
Download the required resources before beginning this tutorial.
Start by opening the file 'pdf-new-window.htm'.
This is the content we're going to apply our JavaScript new window function to.
Read More......

