W3C home > Mailing lists > Public > www-svg@w3.org > October 2003

Re: linking from svg to html frames

From: Jim Ley <jim@jibbering.com>
Date: Tue, 21 Oct 2003 09:16:35 -0000
To: www-svg@w3.org
Message-ID: <bn2tj8$v66$1@sea.gmane.org>

"Chad" <chadnash@optusnet.com.au> wrote in message
> I have svg in one frame and I want a click on an svg object to change
> the contents of a sibling frame.
> the main problem is that I cant refer to the sibling frame in javascript
> within the svg.

There is absolutely no need to use javascript here.

>     <script type="text/javascript"> <!--
>           function inHtml(a) {
>             top.ff1.location=a;

This isn't specified in any W3 recommendation or other standard, so there is
nothing that can be expected to work.

>       <a name="f1">I have tried both object and embed<a><br>
>       <span   onclick='top.ff1.location="frames.html#f4"'>just check
> that html works</span><br>

<a target="ff1" href="frames.html#f4">...</a>

For HTML, there's nothind defined in HTML for your above javascript, indeed
I know it fails in a number of UA's.

> <svg>
>   <script type="text/javascript"> <!--
>       function inSvg(a) {
>         top.ff1.location=a;
>       }
>     --> </script>

This is just a script error, I would strongly recommend not using scripting
until you understand a little bit more about it - first thing to learn is
when not to use it.  (--> at the end is a script error, nothing more)

<a target="ff1" xlink:href="frames.html#f4"><circle cx='10' cy='10' r='5'

None of your javascript (including the ones which appear to work) have any
reason to work other than luck, don't use them, especially as there's no

For questions such as this the svg-developers mailing is the appropriate
place to discuss them.

Received on Tuesday, 21 October 2003 05:17:36 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 22:53:59 UTC