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

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×314
×60

question asked: 13 Jul '20, 14:23

question was seen: 916 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