• Advertisement


This topic is now archived and is closed to further replies.

Opera javascript write in/frame workaround

This topic is 5139 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Normally it is possible for Javascript to write to a page using the document.write() function. When dealing with a different frame this is still possible in theory by using parent.framename.document.write(). One interesting use of this is to create a "console" frame to which output can be written on a perodic basis (for instance in frame A we could have a javascript calculator, and in frame B a history of all the operations). In IE and Mozilla this is fine. However when we use Opera (I''m using the slightly old Opera 7.11.2887) we run into problems trying to write across frames. The first problem is that the first write only updates part of the frame (you can see this easily using background colors as only a small strip changes color. If you force a repaint by minimizing or dragging another window across the entire frame becomes the right color. This is an obvious bug in the renderer). The second problem is that the writing to another frame does not work as it does in IE and Mozilla. While the behavoir is not as clearly defined as it could be in the standard, the accepted behavoir is that multiple writes will be result in appends (so if you write one line, then another you will gave two lines). Opera however will clear the source before every write, meaning only the last write block is visible. Does anyone know if there is a way around this, or a more Opera friendly way of implimenting a console/logging frame without resorting to pure Java or ActiveX (using javascript is already a stretch for the type of compatiblity I''m seeking)

Share this post

Link to post
Share on other sites

  • Advertisement