Question

I am trying to link to a different page from an SVG but the link causes the page to open within the containing and not the specified page.

Basic samples of my code:

HTML

<object data="/Sample.svg" type="image/svg+xml" class="Svg">
    <a href="/Sample.svg">
        <!--[if lte IE 8 ]-->
        <p class="SvgFallback">Fallback text</a></p>
    </a>
</object>

Link within Sample.svg

<a xlink:href="/Page.aspx">
  <tspan x="14.78" y="8.4" fill="#FFFFFF" font-family="'UniversLTStd-Black'"        font-size="7"> Sample</tspan><tspan x="0" y="16.8" fill="#FFFFFF" font-family="'UniversLTStd-Black'" font-size="7">page</tspan>
</a>
Was it helpful?

Solution

Make the like this:

<a href="/Sample.svg" target="_top">

target specifies where the link should open, _top makes it full-page.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top