this is the html:
<a href="Javascrip t:change();">ch ange</a>
<object data="a.htm" type="text/html" width="200" height="200"
id="obj"></object>
and this the javascript:
function change()
{
document.getEle mentById('obj') .setAttribute(' data','b.htm');
alert(document. getElementById( 'obj').data);
}
this little script shall change the data of the <object> from 'a.htm'
to 'b.htm' - which it actually does. the alert() shows 'b.htm' as
data.
but: 'b.htm' is not displayed, the content of object doesn't change -
same in firefox, ns, ie.
what am i missing?
any help appreciated, micha
<a href="Javascrip t:change();">ch ange</a>
<object data="a.htm" type="text/html" width="200" height="200"
id="obj"></object>
and this the javascript:
function change()
{
document.getEle mentById('obj') .setAttribute(' data','b.htm');
alert(document. getElementById( 'obj').data);
}
this little script shall change the data of the <object> from 'a.htm'
to 'b.htm' - which it actually does. the alert() shows 'b.htm' as
data.
but: 'b.htm' is not displayed, the content of object doesn't change -
same in firefox, ns, ie.
what am i missing?
any help appreciated, micha
Comment