Feedback on: irt.org FAQ Knowledge Base Q853
Worth:
Very worth reading
Comments:
Unfortunately the script does not work when the iframe is of the form:
<p><IFRAME HEIGHT=70 WIDTH=80 SRC="\\P466\c_466\2\training\"></IFRAME>
This form is used to run windows applications in IE4 (hta's can be used in IE5).
Is there a fix please??
Thanks,
Tony
Worth:
Worth reading
Comments:
Although it doesn't cover the technique to achieve this in Netscape 6? Do you know where I can find this information. I've been looking for this for about 2 days.
Thanks in advance
Nick Middleweek
Worth:
Worth reading
Comments:
Did you really test for Netscape 6.x
I am running 6.01, and the javascript document.frames returns undefined. This is in keeping with the netscape site which says that document.frames is an IE only feature. See:
http://developer.netscape.com/evangelism/docs/technotes/xref/document-object/
I've also tried using document.getElementById to no avail. That does get the object (evidenced by alert returning the string "object HTMLIFrameElement") but document.open etc doesn't work on the object.
In fact, if you put an alert after the open method, it never gets displayed, indicating the javascript is broken.
Welcome to Nutscrape Agrivator.
Anyhow, if anyone knows how to write some html into an iframe in netsape 6.x (works fine in ie) please let me know.
Thanks.
Technical:
Not technical enough
Comments:
It works fine but not all the time. If I add <script language="JavaScript"></script> to above code, it gives error.
Try this code which gives me error -
<iframe width="100%" height="100" src="blank.htm"></iframe>
<script language="JavaScript">
document.frames[0].document.open();
document.frames[0].document.write('<html>');
document.frames[0].document.write('<head>');
document.frames[0].document.write('<script language = "JavaScript">');
document.frames[0].document.write('function foo(){alert("hi");}');
document.frames[0].document.write('</script>');
document.frames[0].document.write('</head>');
document.frames[0].document.write('Hello world');
document.frames[0].document.write('</html>');
document.frames[0].document.close();
</script>
Can you help me in solving this problem?
Worth:
Worth reading
Comments:
One problem is that the sample code doesn't work in Mozilla.
document.frames doesn't exist in Mozilla, but parent.frames does. That code works in both Mozilla and IE5 on the macintosh. I suspect, or rather hope, it's the same on other platforms as well.
Nonetheless, this was very helpful. Thanks!
Worth:
Worth reading
Comments:
This works in IE but it appears Netscape 6 doesn't even have a frames array.