• I have this site https://www.tinemuller.dk/wholocations/bookcode/ where I
    have some php code that links to other sites from the markers infowindows
    and it’s functioning.

    <? $info_html='<b>'.$row['post_name'].'</b><br />'.$row['adresse'].'<br
    />'.$row['postnummer']. ' ' . $row['location'].'<br />' .'<b>Position:</b> '
    .$row['lat']. ', ' . $row['lon'].'<br /><br />' .'  Maybe read some more
    informations and make a comment to a blog. Something like <a
    href="'.$wordpress_url.'">this.</a><br><br>Or maybe link to more info.
    Something like <a
    href="https://www.toiletmap.gov.au/browse.aspx?type=area&id=6f950288-da86-450a-9171-e67f5b98c6df">this.</a>';
    ?>

    Now I’m trying to use an iframe in my WordPress site as you can see here
    (just for testing, not sure I will use it this way)
    https://www.tinemuller.dk/new_wordpress/map-test/ and if you click the
    markers infowindows the sites open up INTO the iframe and that’s not what I
    want. Could someone help me how to make the links functioning with
    target=”_top” ?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hi Tine

    In the file you are linking to in your iFrame, you should add some code to make each link open up in their own windows. You do that by adding this code before </head>

    <base target=”_blank”>

    If you are linking to a PHP file that doesn’t have the head tag, find it in another PHP file. They are usually called “header.php”.

    Good luck!

    Britt Malka
    Are you reading all your books? https://www.16min.com

    Thread Starter tinem

    (@tinem)

    Thanks for your tip Britt. I put the code in my index.php and everything is functioning beautifully. Didn’t know it would be so easy.:-)

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘PHP – iframe – target=”_top” – help’ is closed to new replies.