:: Forum >>

Saving contents of a frame through another frame

Hi,
i have a html page which contains 2 frames. How can i save the contents of frame2 as a html file using a button click in frame1?
Manu
Monday, June 26, 2006
u cant save the file in client using javascript, however to get content of html its simple:
<html>
<head>
<script>
function showMeFrame2() {
alert(document.getElementById("fm2").innerHTML);
}
</script>
</head>
<body>
<input type='button' name='b1' id='b1' value='Show FM2 Content' onClick='showMeFrame2()'>
<iframe id='fm2' name='fm2' src='another_file.html'></iframe>
</body>
</html>
// another_file.html
<html>
<body>
<h1>HELLO WORLD!</hi>
</body>
</html>
Paulo Cesar Silva Reis (PC from Brazil)
Tuesday, June 27, 2006

This topic is archived.


Back to support forum

Forum search