NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum

Hello everybody,

other people seem to have had this problem already, but I could not find a viable solution for my case. I have a UMap with some location markers that show projects. This UMap is shown in an iframe embedded on the projects' website. Each project has its own page with detailed information. I have put a link to each project's page in the marker description, but I would like these links to open in the window with the iframe page, since they are all on the same website.

I found a little script on the web which I tried:

function onLoadIF(frame)
{
    var elements = frame.getElementsByTagName('a'),
        len = elements.length;

    while( len-- ) {
        elements[len].target = "_parent";
    }
}

This doesn't work however, since the map is also generated by javascript. Is there any way of accessing those links in the descriptions by javascript so I can change their targets?

Many thanks in advance for your ideas and help!

asked 13 Jul '20, 14:23

Netzhexe's gravatar image

Netzhexe
101235
accept rate: 0%

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Question tags:

×314
×60

question asked: 13 Jul '20, 14:23

question was seen: 1,026 times

last updated: 13 Jul '20, 14:23

NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum

First time here? Check out the FAQ!

×