micha: embed-tag SVG / javascript

Beitrag lesen

hallo thomas,
ich bin dumm. wenn ich mir dein beispiel anschaue greifst du ja nur auf svg-objekte in deinem script zu? das item[0] resp. [0] habe ich verstanden, der zusammenhang zu meinem problem - entschuldige - ist mir leider nicht klar.

leider kann ich dir das beispiel nicht online stellen.

ich versuche es mal mit ein paar codes:
=>frameset:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN">
<html>
<head>
<title></title>
</head>
<frameset rows="15%,*,8%" cols="*" framespacing="0" frameborder="NO" border="0">
  <frame src="up.asp" name="topFrame" scrolling="NO" noresize >
  <frameset rows="*" cols="9%,*,25%" framespacing="0" frameborder="NO" border="0">
    <frame src="left.asp" name="leftFrame" scrolling="NO" noresize>
    <frame src="main.asp" name="mainFrame">
    <frame src="right.asp" name="rightFrame">
  </frameset>
  <frame src="down.asp" name="bottomFrame" scrolling="NO" noresize>
<noframes>
<body>
</body>
</noframes>
</frameset>
</html>

=>main.asp
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<link rel="stylesheet" type="text/css" href="default.css">
<script src="..\js\functions.js" type="text/javascript">
</script>
</head>
<body>
<embed name="karte" src="themap.asp" type="image/svg+xml" width="100%" height="99%">
</embed>
</body>
</html>

=> in main.asp eingebundene datei "themap.asp":
<%Response.AddHeader "Content-Type","image/svg-xml"%>
<svg width="100%" height="100%" viewBox="5300000 -5735000 180000 180000" id="svgAll" name="svgAll" preserveAspectRatio="xMidYMid meet"
     xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<script xlink:href="..\js\functions.js" type="text/ecmascript" />
<defs>
</defs>

=> in main.asp eingebundene javascript-datei functions.js:

function tuwas()
  {

var svgdoc_vom_frame_frame_right=top.frames("frameRight").document.infofield.getSVGDocument();
  alert svgdoc_vom_frame_frame_right;
  }

=> die datei für den rechten frame:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 //EN" "http://www.w3.org/TR/html4/frameset.dtd">
<html>
<head>
<title>Unbenanntes Dokument</title>
<script src="..\js\functions.js" type="text/javascript">
</script>
<link rel="stylesheet" type="text/css" href="default.css">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<table width="100%" border="0">
  <tr>
    <td><embed height="100" src="ov.asp" type="image/svg+xml" width="100%"></td>
  </tr>
  <tr>
    <td><embed name="coordinates" height="20" src="coords.asp" type="image/svg+xml" width="100%"></td>
  </tr>
  <tr>
    <td><embed name="infofield" height="20" src="info.asp" type="image/svg+xml" width="100%"></td>
  </tr>
  <tr>
</table>
</body>

vielleicht kannst du mir das ja an einem beispiel erklären.

micha