M
mike
I have a html page that has an inframe very similiar to the one Jim Ley
put out at:
http://jibbering.com/2003/8/iframetest.html
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Test by TM 08/03</title>
</head>
<body>
<iframe name="kreise" src="kreise.svg" width="500" height="100"
frameborder="0">
content for browsers without SVG access ...
</iframe>
</html>
The only difference is that the user is clicking on a link in
kreise.svg to get the parent document. I get "ReferencError: Parent is
not defined"
kreise.svg would look like:
<svg width="1024px" height="626px" onload="initsvg(evt);" viewBox="0 0
1024 626" preserveAspectRatio="none" xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:a3="http://ns.adobe.com/AdobeSVGViewerExtensions/3.0/"
a3:scriptImplementation="Adobe">
<title>Graphic</title>
<defs>
<script language="JavaScript">
<![CDATA[
var svgObj;
function initsvg(evt)
{
if ( window.svgDocument == null )
{
svgDocument = evt.target.ownerDocument;
}
svgObj = svgDocument.documentElement;
}
function close_graphic(evt)
{
var obj;
obj=parent.frames["kreise"];
alert(obj);
//parent.document.getElementById('kreise').style.visibility='hidden';
}
]]>
</script>
</defs>
<a onclick="close_graphic(evt);">
<text x="35" y="35" font-family="Arial" font-size="20" fill="#ff0000"
pointer-events="all">Close</text>
</a>
</svg>
Anyone have any idea why this does not function?
Mike
put out at:
http://jibbering.com/2003/8/iframetest.html
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Test by TM 08/03</title>
</head>
<body>
<iframe name="kreise" src="kreise.svg" width="500" height="100"
frameborder="0">
content for browsers without SVG access ...
</iframe>
</html>
The only difference is that the user is clicking on a link in
kreise.svg to get the parent document. I get "ReferencError: Parent is
not defined"
kreise.svg would look like:
<svg width="1024px" height="626px" onload="initsvg(evt);" viewBox="0 0
1024 626" preserveAspectRatio="none" xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:a3="http://ns.adobe.com/AdobeSVGViewerExtensions/3.0/"
a3:scriptImplementation="Adobe">
<title>Graphic</title>
<defs>
<script language="JavaScript">
<![CDATA[
var svgObj;
function initsvg(evt)
{
if ( window.svgDocument == null )
{
svgDocument = evt.target.ownerDocument;
}
svgObj = svgDocument.documentElement;
}
function close_graphic(evt)
{
var obj;
obj=parent.frames["kreise"];
alert(obj);
//parent.document.getElementById('kreise').style.visibility='hidden';
}
]]>
</script>
</defs>
<a onclick="close_graphic(evt);">
<text x="35" y="35" font-family="Arial" font-size="20" fill="#ff0000"
pointer-events="all">Close</text>
</a>
</svg>
Anyone have any idea why this does not function?
Mike