I am having problems with changing a frames source file for Mozilla
(1.5.0.4). The followig code works for IE:
<script type="text/javascript">
var imgP = new Image();
function ShowPic(ShowThis, wdth, hght) {
imgP.src = "../pics/' + ShowThis + '"
xw = 500;
yh = 500*(hght/wdth);
window.document.getElementById("graphic").innerHTM L = '<img src="../
pics/' + ShowThis + '" width="' + xw + '" height="' + yh +
'"border="0">';
}
function ChangeList(oSel) {
window.document.getElementById("F1").src = oSel;
}
</script>
....
....
....
<div id="graphic">
<script>ShowPic("company_name.gif", 1255, 324)</script>
</div>
<p align="center"> </p>
<td valign="bottom" width="17>
<img border="0" src="../images/
coner_right_top.gif" width="17" height="130">
</tr>
<tr>
<td class="blank" height="17" width="17</td>
<td class="blank" height="17" align="right"
width="527">
<img border="0" src="../images/
coner_right_bottom.gif" width="180" height="17"></td>
<td class="blank" height="17" width="17">
<img border="0" src="../images/coner_right.gif"
width="17" height="17></td>
</tr>
</table</td>
</tr>
<tr>
<td width="100%">
<p style="margin-bottom: 0; margin-top:0"
align="center">
<select size="1" name="D1"
onChange="ChangeList(this.options[ this.selectedIndex].value);" >
<option selected value="PlayList2.htm">September
2003</option>
<option value="PlayList1.htm">Urban Bistro X-Mas
Dinner</option>
</select></p>
<p style="margin-top: 0; margin-bottom: 0">
<iframe name="I1" id="F1" width="549" height="189"
src="PlayList2.htm">
Your browser does not support or is currently
configured not to display inline frames</iframe>
<p align="center" style="margin-top: 0; margin-bottom:
0">
....
....
....
Within the function:
function ChangeList(oSel) {
window.document.getElementById("F1").src = oSel;
}
I have tried
frames["I1"]
getElementsByName("I1")
.innerHTML
.src
but to no success. I do not think I can depend on the Java console to
help debug, because it indicates that
"window.document.getElementById("graphic").innerHT ML" has no
properties, when the ShowPic function antually works (it is called by
the clickable graphics in the iFrame).
Any help would be appreciated!
- Jon