Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

hide all object tags

Status
Not open for further replies.

lucidtech

IS-IT--Management
Jan 17, 2005
267
US
Is there a way I can easily hide all object tags (ie. flash embedded video) using javascript? There will be a dynamic number of object tags, depending on the page loaded at the time.

Thanks in advance.
 
Something like:

Code:
var objs = document.getElementsByTagName('object');

for (var loop=0; loop<objs.length; loop++) {
   objs[loop].style.display = 'none';
}

Hope this helps,
Dan



Coedit Limited - Delivering standards compliant, accessible web solutions

Dan's Page [blue]@[/blue] Code Couch:
Code Couch Tech Snippets & Info:
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top