Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 167
  • Last Modified:

How do I change the link target for multiple pdf documents?

I have many pdf documents in a website that I want to have each one open in a new window when the each link is clicked on. How do I change all the pdf document links in a entire website to target _blank without changing each one individually?
0
Barbara69
Asked:
Barbara69
  • 2
1 Solution
 
Jason C. LevineNo oneCommented:
Hi Barbara69,

Do a Find and Replace on the entire site.

Set the search parameters to source code and search for the following string:

.pdf"

Replace with:

.pdf" target="_blank"

You should probably do a Find All first just to make sure you don't catch anything you don't want to by accident.
0
 
Barbara69Author Commented:
Thank you so very much. You saved me a lot of time. I had tried find and replace, but I was using *.pdf for my search string, needlessly to say, unsuccessfully. Thanks once again.
0
 
Jason C. LevineNo oneCommented:
You're welcome.

*.pdf will not work inside of Dreamweaver but you CAN use regular expressions to get the same functionality.  In this case, it was easier to do a normal F/R and not muck around with regex.
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now