- Codice: Seleziona tutto
function ShowFrame()
{
document.getElementById(" ? ? ?").value = "hidden"
}
Immagino che sia necessario fornire il riferimento delle pagine, ma non sono riuscito a trovare nulla in merito.
Grazie.
Moderatori:
Paolino,
fairyvilje
function ShowFrame()
{
document.getElementById(" ? ? ?").value = "hidden"
}


<button id="myButton" type="button">Click Me!</button>function ShowFrame()
{
document.getElementById('myButton').value = <value>
}




<!DOCTYPE html>
<html>
<head>
<title>Index</title>
<script type="text/javascript">
function Bar(){
document.getElementById('frame1').src='page1.html';
document.getElementById('frame2').style.display='inline';
}
</script>
</head>
<body>
<h1>Pagina index</h1>
<div name=menu>
<button id="button1" onclick="Bar()">foo</button>
</div>
<iframe id="frame1" src="page2.html"></iframe>
<iframe id="frame2" src="page3.html" style="display:none"></iframe>
</body>
</html>freccia1956 ha scritto:In altre parole all' evento onLoad del page1 devo assegnare una funzione che deve rendere visibile un iFrame che non è un oggetto locale ma un oggetto che si trova sulla Home page.
<!DOCTYPE html>
<html>
<head>
<title>Index</title>
<script type="text/javascript">
function Bar(){
document.getElementById('frame1').src='page1.html';
}
</script>
</head>
<body>
<h1>Pagina index</h1>
<div name=menu>
<button id="button1" onclick="Bar()">foo</button>
</div>
<iframe id="frame1" src="page2.html"></iframe>
<iframe id="frame2" src="page3.html" style="display:none"></iframe>
</body>
</html><!DOCTYPE html>
<html>
<head>
<title>page 1</title>
<script type="text/javascript">
function CoseBrutte(){
parent.document.getElementById('frame2').style.display='inline';
}
</script>
</head>
<body onload="CoseBrutte()">
<h1>Page 1</h1>
</body>
</html>

function prova()
{
document.getElementById("Editbox1").value=33
document.getElementById("Editbox3").value=44
}

<!DOCTYPE html>
<html>
<head>
<title>Index</title>
</head>
<body>
<h1>Pagina index</h1>
<iframe id="frame1" src="page1.html"></iframe>
<iframe id="frame2" src="page3.html"></iframe>
</body>
</html><!DOCTYPE html>
<html>
<head>
<title>page 1</title>
<script type="text/javascript">
function prova() {
document.getElementById("Editbox1").value=33;
top.document.getElementById("frame2").contentWindow.document.getElementById("Editbox3").value=44;
}
</script>
</head>
<body>
<h1>Page 1</h1>
<button onclick="prova()">Valori</button>
<input id="Editbox1"/>
</body>
</html><!DOCTYPE html>
<html>
<head>
<title>page 3</title>
</head>
<body>
<h1>Page 3</h1>
<input id="Editbox3"/>
</body>
</html>Visitano il forum: Nessuno e 5 ospiti