As long as the document loaded in the IFrame isfrom thesame domain as the parent frame, then you should be able to access it's contents.
Sample is
Code Snippet
<script>
document.frames["MyIFrameID"].document.MyFormID.MyInputElem
</script>
Of course, you need to replace "MyIFrameID" with the id of your IFrame.IfIFrame's document is notsame domain as the parent frame's domain then you willget access denied security exception.
With the little modification to your code this can be achieved. Below is the modified code
File1.html
Code Snippet
<
html>
<
body>
<form id="MyForm">
<input id="Text1" type="text" value="Old value" />
<form>
</
body>
</
html>
File2.html
Code Snippet
<
html>
<
body>
<iframe id="iframe" src="File1.htm"></iframe>
<input id="but" type="button" onclick="SetText();" />
<script type="text/jscript">
function SetText()
{
document.frames[
"iframe"].document.forms["MyForm"].Text1.value = "My new Value";
}
</script>
</
body>
</
html>
Hope with helps.