I am having problems with IFrames and Firefox.
To make things simple I have index.html and frame.html:
------------ index.html -----------------
<html>
<head>
<title></title>
<script language="javascript" type="text/javascript">
<!-- Hide from Non-Javascript browsers
function getTextBoxValue()
{
responce =
document.frames["myFrame"].document.getElementById("myTextBox").value;
alert(responce);
}
function getIFrameSRC()
{
responce = document.frames["myFrame"].src;
alert(responce);
}
// Stop Hiding -->
</script>
</head>
<body>
<h1>Here is the IFrame</h1>
<iframe id="myFrame" name="myFrame" src="./frame.html"></iframe>
<br /><br />
<input type="button" onClick="getTextBoxValue();" value="Get Text Box
Value" />
<input type="button" onClick="getIFrameSRC();" value="Get IFrame SRC"
/>
</body>
</html>
------------ frame.html -----------------
<html>
<head>
<title></title>
</head>
<body>
Hello, I am in your frame...
<br /><br />
<input type="text" name="myTextBox" />
</body>
</html>
My problem is anytime I try to reference the IFrame and beyond, I get
the following error:
Error: document.frames has no properties
This works fine in IE.
How can I reference the IFrame and its contents in Firefox?
Thanks in advance...