3

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>

It depends on the size of the data. If it very big it can slow down the program having all the structure in memory.

If the memory is not a problem you should keep the structure in memory instead of reading all the time from a file. Open a file again and again with concurrents request is not a good solution.

4

1 に答える 1

1

次のようにします。

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

target はリンクを開く場所を指定し、_top はフルページにします。

于 2013-11-07T15:33:03.380 に答える