views:

161

answers:

1

I've got a html form submitting to a pdf using cfdocument.

Within that pdf, I have a link at the bottom that goes to another policy. I need that link to open up on a new page, rather than _self.

I've tried using Jquery to open the window and not sure if that is even possible, but wasn't successful to say the least.

So basically, I've got.

<cfdocument format="pdf">


    <a href="http://www.stackoverflow.com" target="_blank">stackoverflow</a>


</cfdocument>

Not possible. Case closed!

Reason:

  • For my purpose, I'd need to be able to open another pdf in a browser window, but in order to do that, you would have to download the second one to Acrobat or another reader you've got.
  • Also, you're not able to use jquery to create the new window.
A: 
<a href="http://www.domain.com" onClick="window.open('http://www.domain.com/pdf.pdf','pdfWindow','width=400, height=400, scrollbars=yes, resizable=yes')">PDF</a>

Or with JQuery

<a href="http://www.domain.com" id="openPdfLink">PDF</a>

$(document).ready(function(){
     $('#openPdfLink').click(function(){
          window.open(this.href);
          return false;
     });

});
Droo
FWIW, I wouldn't add the jQuery library for the sake of using one simple function.
Droo
I just stated that I tried that. I've looked more into this, it's not possible, case closed.
Michael Stone