...

View Full Version : JavaScript and OBJECT tag



simkoe
07-05-2004, 06:49 PM
Hi,

In Mozilla/FireFox, if I have the following construct:


<object classid="clsid:abc..." id="object1" width="100%" height="400">
<textarea name="alternate1" id="alternate1" cols="60" rows="15"></textarea>
</object>


How can I determine using JavaScript if the object or the textrea is being rendered by the browser? The following works in IE but not in Mozilla/FireFox.


if (document.getElementById('object1') && document.getElementById('object1') != null) {
alert('object is rendered');
} else {
alert('textarea is rendered');
}


Thanks.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum