shumway
11-05-2003, 07:54 AM
Im trying to move an image within an iframe. The problem is that I have the id of the iframe in a variable and I cant get it to work.
This works great:
Games.document.all['DivBorderTR'].style.left = 100;
But this doesnt:
$module = 'Games';
getElementById( $module ).document.all['DivBorderTR'].style.left = 100;
(I have several iframes that looks similar and this code is supposed to work for any iframe-id given in $module.)
You can look at it at: www.battlesite.com/henrik/battlesite2 (just press login-button - no userid or password required)
This works great:
Games.document.all['DivBorderTR'].style.left = 100;
But this doesnt:
$module = 'Games';
getElementById( $module ).document.all['DivBorderTR'].style.left = 100;
(I have several iframes that looks similar and this code is supposed to work for any iframe-id given in $module.)
You can look at it at: www.battlesite.com/henrik/battlesite2 (just press login-button - no userid or password required)