Image Hyperlink to open in same window for Landing Pages

Anonymous
Not applicable

Image Hyperlink to open in same window for Landing Pages

Hello,

Does anyone know how to set an image hyperlink to open in the same window for landing pages? I want my landing page to feel like our website and when an image is clicked, it takes you to the appropriate link in the same window. Currently, anytime an image is clicked, the URL is opened in a new window. 

Thanks!
Tags (1)
1 REPLY 1
Anonymous
Not applicable

Re: Image Hyperlink to open in same window for Landing Pages

Either with javascript (below) or by setting a page default. Or in every indivicual link by adding target="_top" or target="_self". Documentation on base target: http://www.w3schools.com/tags/att_base_target.asp





var a = document.getElementsByTagName(
"a");
for (i=0;i<a.length;i++) {

        if (a[i].target="_blank") {
            a[i].target="_self"
        }
                        
}