user1040048
user1040048

Reputation:

<object> and link in included SVG document

I'm including a SVG document with a object tag in a webpage.

<html>
    <head>
         <title>CA/7GroupPDZBP2</title>
    </head>
    <body>
         <object data=".\toto.svg" height="400" src=".\toto.svg" type="image/svg+xml" width="100%"></object>
    <body>
</html>

In my toto.svg document i have some links like this :

<svg style="background-color:transparent;" version="1.1" viewBox="0 0 1925 476" width="1925" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
    <a style="cursor:pointer;" xlink:href="page2.html">
        <text>Tony</text>
    </a>
</svg>

However if i click on the link, only the content of the object tag is replaced by the destination link in my page. The whole page is not refreshing.

Anyone knows how to solve this problem ?

Thanks for your help, Cuva

Upvotes: 1

Views: 362

Answers (1)

Robert Longson
Robert Longson

Reputation: 123985

Specify target="_top" on the link according to http://www.w3.org/TR/SVG/linking.html#Links

Upvotes: 3

Related Questions