Собственно ничего серьезного, но я почему-то в тупике
Может быть есть у кого мысль хорошая
Код:
<html>
<head>
<script>
function setContent(obj)
{
__parent = obj;
while(true){
__string = "<html><head><style>*{font:12px tahoma;}</style></head><body>";
for(i in __parent) __string += i + ": " + __parent[i] + "<br>";
__string += "</body></html>";
document.mFrameName.document.write(__string);
break;
// if(__parent == null) break;
// else __parent = __parent.parentNode;
}
}
</script>
<style>
*
{
background-color: #DDD;
border: solid 1px #333;
color: #333;
}
a
{
display: block;
text-align: center;
font: bold italic 12px "Tahoma";
background: white;
text-decoration: none;
margin-bottom: 1px;
}
a:hover
{
background: #CC3;
color: white;
}
</style>
</head>
<body style="background: #CC9;">
<table width="100%" height="100%" style="border-collapse: collapse;">
<tr>
<td valign="top" width="250" style="background: #970;">
<a href="#" onClick="setContent(window);">window</a>
<a href="#" onClick="setContent(document);">window.document</a>
<td valign="top">
<iframe id="mFrame" name="mFrameName" src="" width="100%" height="100%" scrolling="auto" frameborder="0"></iframe>
</td>
</tr>
</table>
</body>
</html>
Как мне катать новый текст не в конец iframe'f, а переписывать то что имеется?
