W3C home > Mailing lists > Public > www-html@w3.org > April 2003

object as as Iframe alternative

From: Marcos Caceres <marcos@datadriven.com.au>
Date: Mon, 28 Apr 2003 11:47:43 -0700
To: <www-html@w3.org>
Message-ID: <000001c30db6$a93c34d0$7290b583@provenance>

HI, 
Given that iframe is not supported by XHTML (strict), I thought it might be
a good idea to simply use an object element as an alternative. The problem
is that I can't seem to get the object element to dynamically update when I
change the data attribute. Does anyone have any idea why object elements
cannot be dynamically updated? ... some sample code:

<object id="myObj" data="test.svg" type="image/svg+xml" width="250px"
height="250px"></object>
<div onclick="document.getElementById('myObj').setAttribute('data',
'test2.svg'); ">Change dynamically!</div>
<div onclick="alert(document.getElementById('myObj').data)">the data is
now...</div>


Thanks, 
Marcos Caceres
Received on Sunday, 27 April 2003 22:24:56 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 27 March 2012 18:15:55 GMT