Coolblu
May 4th, 2004, 07:13 AM
Hi I've got an html file (main.html) with a frameset, left frame(called links, file is links.html) is for links, right frame (called viewer, file varies, always .svg) is used to display an SVG file.
I'm trying to use a link in the left frame to show/hide a group in the SVG file.
I'm having problems accessing the group.
trying to use:
var SVGdoc = window.parent.frames[1].document.getSVGDocument();
or
var SVGdoc = window.parent.viewer.document.getSVGDocument();
(The above bit is not working)
then I can use SVGdoc.getElementById("groupID") and setAttribute("visibility").
This worked when the SVG file was embedded in the html file, but I want to use frames so javascript function is in left frame and called when button in left frame is clicked.
What am i doing wrong with accessing the SVG document?
Thanks in advance to anyone that can see my errors
Brad (Coolblu)
I'm trying to use a link in the left frame to show/hide a group in the SVG file.
I'm having problems accessing the group.
trying to use:
var SVGdoc = window.parent.frames[1].document.getSVGDocument();
or
var SVGdoc = window.parent.viewer.document.getSVGDocument();
(The above bit is not working)
then I can use SVGdoc.getElementById("groupID") and setAttribute("visibility").
This worked when the SVG file was embedded in the html file, but I want to use frames so javascript function is in left frame and called when button in left frame is clicked.
What am i doing wrong with accessing the SVG document?
Thanks in advance to anyone that can see my errors
Brad (Coolblu)