Archived topic
Have external link open in smaller window
6 replies · Started by CRISTO on February 13, 2018
I am not sure how to word this: |All the external links on my site open in a new window. I had thought to put a notification on those links using the "Exit Notifier" plug-in. Works Ok, but now I found something that I think will work better...but clueless as to how to do it.
Looking at Tripadvisor on this page if you click website at the top of the page (right next to Vatican Museums) it opens in a new window, but smaller than the TripAdvisor window, so you know you are going to a new window. Pretty neat imho, but not sure how to accomplish this. Any ideas?
Hi there,
Not too sure what I'm looking at? I see lots of "Vatican Museums" on that page.
Sorry... I should have been clearer.
“Vatican Museum Tour”
underneath there are images, and then to the right of those images there is a listing of "Vatican Museums"
Underneath Vatican museums is:
Viale Vaticano, 00120 Vatican City, Italy +39 06 6988 4676
Website E-mail Improve this listing
When you click on "website" it opens up the page in a new window about half the size of my site window, where you can see both the smaller TripAdvisor page and their original page.
Does this make it any clearer?
You would have to use javascript within the link:
<a href="URL TO YOUR PAGE" onclick="window.open(this.href,'targetWindow', 'width=500, height=500'); return false;">Your link text</a>
I believe that should work.
Thanks, Tom. I realize this was not really a GP problem, but was hoping some smart guy like you could give me an answer.
No problem :)
It worked like a charm, but I realized that won't be practical....with thousands of external links I would have to change each one (I assume). So I will keep looking....perhaps some css.