Ola Todos;
Tenho dois frames em minha pagina e preciso manipular os elementos de uma para outra .
Alguem pode me ajudar ??
var frm = parent.document.getElementById('Frame2').contentDocument;
A partir deste ponto nao estou conseguindo fazer mais nada.
Iframe - Acessar Elementos
Started By ghb, 12/04/2010, 15:26
1 reply to this topic
#1
Posted 12/04/2010, 15:26
#2
Posted 12/04/2010, 16:09
<script>
function adjustFrame(frame) {
if (document.all) {
var w = frame.document.body.scrollWidth;
var h = frame.document.body.scrollHeight;
if(frame.document.body.scrollWidth > frame.document.body.offsetWidth) {
document.all[frame.name].height = h + 0;
}
else {
document.all[frame.name].height = h;
}
}
else if (document.getElementById) {
var w = frame.document.width;
var h = frame.document.height;
if(frame.document.body.scrollWidth > frame.document.body.offsetWidth) {
document.getElementById(frame.name).height = h + 0;
}
else {
document.getElementById(frame.name).height = h;
}
}
return false;
}
</script>
</head>
<body>
<table width="776" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td height="297"><iframe name="topo" src="topo.html" width="950" height="400" frameborder="0" marginheight="0" marginwidth="0" scrolling="no"></iframe></td>
</tr>
<tr>
<td valign="top"><iframe name="conteudo" id="conteudo" marginheight="0" frameborder="0" width="950" height="100%" src="corpo.html" scrolling="no" onload="adjustFrame(conteudo);"></iframe></td>
</tr>
<tr>
<td height="48" valign="top"><iframe name="rodape" src="rodape.html" width="950" height="107" frameborder="0" marginheight="0" marginwidth="0" scrolling="no"></iframe></td>
</tr>
</table>
</body>
</html>
Edição feita por: Guilherme Texa, 12/04/2010, 16:10.
1 user(s) are reading this topic
0 membro(s), 1 visitante(s) e 0 membros anônimo(s)










