daff: Variable aus einem Frame in anderes übertragen

Beitrag lesen

hallo
cool dass du so schnell antworten konntest. leider geht es bei mir immernoch nicht. hier mal meine 3 dateien:

index.html:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Unbenanntes Dokument</title>
</head>

<frameset cols="400,*" frameborder="yes">
  <frame src="links.html" name="links" id="links" title="links" />
  <frame src="content.html" name="content" id="content" title="content" />
</frameset>
<noframes><body>
</body>
</noframes></html>

---------------------------------------------
links.html

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Unbenanntes Dokument</title>
</head>

<body>
<script type="text/javascript">
var x = 44;
document.write(x);
parent.content.x;
</script>
</body>
</html>

--------------------------------------------
content.html

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Unbenanntes Dokument</title>
</head>

<body>
<script type="text/javascript">
document.write(x);
</script>
</body>
</html>

ich weiß echt ne was ich falsch mache.
daff