I'm trying to create an onClick that will change an embedded html page. I'm using the same syntax that works for both <img> and <iframe>.

<object id="thing" data="page1.html" type="text/html">
error message

<a href="#" onClick="javscript:document.getElementById('thing').data='page2.html';">
There must be some fundamental difference between changing an image or iframe "src" and changing an object's "data" that totally escapes me because the above script won't update/refresh/reload/change the existing embedded page (page1.html) to page2.html.

I have run the script with an "alert(document.getElementById('thing').data)" tacked onto the end of the above script, and it does, in fact, return "page2.html" in the dialogue box. So, maybe, I just need to refresh the object (without reloading the whole page!)?

I've noticed that <object> is usually used with applets and flash and sound and there seem to be commands to "run" them, but I can't find any terms to handle updating an embedded html document. Maybe there really just isn't any way to do this yet aside from iframe?

-- H