Moist wrote:
I have an embedded HTML object as follows (ignore the code tag):
<code>
<object id="page" data="table.htm l" type="text/html" .... >
</code>
I look for the Javascript code (placed in the main document) that can reload
or refresh the object contains at will?
Consider using an iframe e.g.
<iframe name="iframeNam e" src="table.html "></iframe>
that way you can in all browsers script
window.frames.i frameName.locat ion.reload();
Refreshing an <object> is difficult across browsers, recent Opera and
Netscape/Mozilla version allow you to access the contentDocument
property of the HTMLObjectEleme nt element object and then you can access
the defaultView and from there the location object:
<object id="object1"
type="text/html"
data="test20040 90402.html">
width="200" height="200"></object>
<input type="button" value="refresh"
onclick="var object = document.getEle mentById('objec t1');
if (object.content Document &&
object.contentD ocument.default View &&
object.contentD ocument.default View.location) {
object.contentD ocument.default View.location.r eload();
}">
--
Martin Honnen
http://JavaScript.FAQTs.com/