[RESOLVED] object.data = location
HTML Code:
<object id="object" data="http://www.vbforums.com/" type="text/html"></object>
This doesn't work:
HTML Code:
document.getElementById('object').data = 'http://merri.net';
This doesn't work:
HTML Code:
document.getElementById('object').setAttribute('data', 'http://merri.net');
Any idea what would work?
Re: object.data = location
This was a bug in Firefox 2. It also didn't work very nicely in Opera 9.
Solution: create an element around the object tag and make an entire replacement of the old element by first clearing everything within the container element and then filling in a new element as required.