|
Replace contents of <iframe>
I have an iframe that starts out blank. Then when the user clicks a button in writes some info to the iframe. Problem I'm having is that when they click a second button it doesn't overwrite whats in the iframe it just adds to it.
Example Code:
<html>
<head>
<script language="javascript">
function writeStuff(){
pane.document.write("hello");
}
</script>
</head>
<body>
<input type="button" value="Write" onclick="writeStuff()">
<iframe src="blank.html" id="pane" height="265" width="345"
frameBorder=0 style="position:absolute;left:22px;top:103px;"></iframe>
</body>
</html>
|