shumway
11-04-2003, 07:28 AM
Hi.
Im having problems accessing an image within an iframe. I guess its really easy but I cant get it to work. This is how my script lookes like (I have simplified it a lot - you can find the real thing on www.battlesite.com/henrik/battlesite2 - just login without username and password and its there.)
Anybody know of a good way to make it easier to find objects in the dom? - like my image here for instance.
Thankyou!
<html>
<head>
<script language="JavaScript1.1" type="text/javascript">
function MoveImage( )
{
//This is the row that doesnt work!!!!!!!!!!!
document.all['Games'].iframe.document.all['DivBorderTR'].style.left = 100;
}
</script>
</head>
<body background="../lib/images/backgrounds/matrix.bmp">
<iframe id="Games" style="position:absolute; left:293; top:5; width:112; height:124px; z-index:1; border:0px #FFFFFF" src="../Mod/Games/Games.htm" frameborder="0" scrolling="no"></iframe>
</body>
</html>
Games.htm lokes like this:
<html>
<body>
<img id="DivBorderTR" src="../../lib/images/backgrounds/DivBorderTR.bmp" style="position: absolute; left: 444; top: 0;" width="109" height="109">
<form method=post name=Games action="">
</form>
</body>
</html>
Im having problems accessing an image within an iframe. I guess its really easy but I cant get it to work. This is how my script lookes like (I have simplified it a lot - you can find the real thing on www.battlesite.com/henrik/battlesite2 - just login without username and password and its there.)
Anybody know of a good way to make it easier to find objects in the dom? - like my image here for instance.
Thankyou!
<html>
<head>
<script language="JavaScript1.1" type="text/javascript">
function MoveImage( )
{
//This is the row that doesnt work!!!!!!!!!!!
document.all['Games'].iframe.document.all['DivBorderTR'].style.left = 100;
}
</script>
</head>
<body background="../lib/images/backgrounds/matrix.bmp">
<iframe id="Games" style="position:absolute; left:293; top:5; width:112; height:124px; z-index:1; border:0px #FFFFFF" src="../Mod/Games/Games.htm" frameborder="0" scrolling="no"></iframe>
</body>
</html>
Games.htm lokes like this:
<html>
<body>
<img id="DivBorderTR" src="../../lib/images/backgrounds/DivBorderTR.bmp" style="position: absolute; left: 444; top: 0;" width="109" height="109">
<form method=post name=Games action="">
</form>
</body>
</html>