guten Tag,
in googles chrome browser kann ich nicht mit JS von einem frame auf einen anderen zugreifen, wenn die dateien lokal gespeichert sind (file:// protokoll).
Ist das ein Fehler ? Ist das _mein_ Fehler ? Gibt's dafür ein workaround?
Meldung:
"unsafe javascript attempt to access frame... domains, protocols and ports must match"
Über HTTP protokoll funktionierts.
In IE7, FF3.6, Opera10 funktionierts über FILE und HTTP.
---- Frameset: ----
<html>
<head>
<TITLE>chrome test</TITLE>
</head>
<frameset cols="20%,*">
<frame name="frameA" src="./chrometest_A.html">
<frame name="frameB" src="./chrometest_B.html">
</frameset>
</html>
---- Seite A: ----
<html>
<head>
<title>frame A</title>
<script type="text/javascript">
function init()
{
alert( parent.frameB.location );
}
</script>
</head>
<body onLoad="init()">
(frame A)
</body>
</html>
---- Seite B: ----
<html>
<head>
<title>frame B</title>
</head>
<body>
(frame B)
</body>
</html>
Sonstiges:
Die Anwendung ist ein Seitenmenü, mit dem im Hauptframe verschiedene Seiten geladen werden.
Lokal ist nötig, denn die Seiten werden auch als CD geliefert.
Die verwendung von Frames ist vom Kunden vorgegeben.
Gruß, Kicia