Open <anchor> with target = "_ blank"?
I use RazorPdf to create a .pdf document from one of my controller actions. Everything works well, except that in my generated PDF file I have a built-in anchor that opens another .pdf that is on the website.
Currently, if the user clicks on the anchor, the .pdf link opens in the same browser window. I do not want this behavior . I want the binding to open in a new browser tab (for example, target = "_ blank"), but cannot find any way to accomplish this. Here is my anchor in my opinion:
<!-- Note: target="_blank" does not work //--> <anchor target="_blank" font="underline" name="top" reference="http://www.example.com/Downloads/Attachment.pdf">Click Here</anchor> +1
gangelo Jun 11 '13 at 19:03 2013-06-11 19:03
source share1 answer
You can add some jquery function and call it when you click the anchor tag
Jquery function is like
$ ("# OpenAttachment"). click (function (e) {
var actionUrl = '/Downloads/Attachment.pdf'; window.open(actionUrl, '', 'width=1000,height=800'); }); This will open a new browser window. Hope this helps :)
0
Aquifer Jul 09 '13 at 11:40 2013-07-09 11:40
source share