PDA

View Full Version : Display PDF in a new browser tab.



blomasky
23 Oct 2013, 1:34 PM
When a user presses a button on my EXT application, I want to have a NEW browser tab opened that will display a PDF. I would have thought I could use something like:

window.open('http://localhost:8500/lumberJS/output/testreport.pdf', '_blank);

but that does not work

HELP!

thanks
Bruce

dawesi
24 Oct 2013, 1:19 AM
use managed iframe or simple iframe. (easy find searching the forums).

either of these should do the trick.

PDF's need to be in their own window, even when using the cross-browser javscript only pdf viewer by mozilla.

blomasky
24 Oct 2013, 5:38 AM
if I use an Iframe, its in the same window right? I want a DIFF. browser tab, since the user will click back and forth between the PDF and my application. Does an Iframe do this?

When I was using Flex, this was easy with a navigateToUrl(url, "_blank"). I assumed there must be something almost this simple in Ext.

Bruce

ettavolt
25 Oct 2013, 2:25 AM
How does window.open('http://localhost:8500/lumberJS/output/testreport.pdf', '_blank); not work?