Access element between diffrent windows!
Hola!This might be a bit tricky!
I would like to access, (tags), from one window although the tag is in an other window.
How do you mean, you might said, this is how:
<!--HTML FILE 1-->
<html>
<head>
</head>
<body>
<h1>Fönster 1</h1>
<input type=\"button\" name=\"b1\" value=\"open\">
<input type=\"button\" name=\"b2\" value=\"change\">
<script type=\"text/JScript.Encode\" src=\"javscriptfile.js\"></script>
</body>
</html>
//javscriptfile.js
function openNewWindow()
{
window.open(\"sökväg till HTML FIL 2\",\'opensmall\',\'width=600,height=400,toolbar=no\');
}
function changeElement()
{
window.document.all.element.innerText == \"Hola amigo!\";
}
window.document.all.b1.onclick = openNewWindow;
window.document.all.b2.onclick = changeElement;
<!--HTML FIL 2-->
<html>
<head>
</head>
<body>
<h1>Fönster 2</h1>
<span id=\"element\"></span>
<script type=\"text/JScript.Encode\" src=\"javscriptfilen.js\"></script>
</body>
</html>
The script is supposed to change the innerText at the <span>-tag in Window 2 from window 1, when some one clicks button b2.
I\'m pretty sure that this doesn\'t work, but it would be great if some one know how, and could explain it to me!
Best Regards
Fredrik
Fredrik
