Click to See Complete Forum and Search --> : Can I detect flash content in a webpage?


jovialjonny
09-03-2003, 01:05 PM
Hi,
I am having trouble because I have some drop down menus that are being hidden behind flash banners and ads on certain webpages...I have found people with similiar issues (from the search Khalid!;) ) and it seems this cannot be sorted except by hiding the flash content temporarily.

The problem is the flash is on someone else's website so I want to know if it is possible to use JavaScript to somehow detect if there is flash content on a page without causing 'access denied' issues?

If not any suggestions of how to deal with this would be appreciated.

Jona
09-03-2003, 01:25 PM
Well, if the page is not on your domain, it causes the "Access denied" error, so you would have to have it on your domain. It is possible to detect if Flash exists on a page, and it is possible to hide it and redisplay it, but only on a Web page on your domain.

[J]ona

jovialjonny
09-03-2003, 02:35 PM
Well the webpage isn't on my domain....so there is no way to detect it in that case is there? Any ideas how I can stop the menus going behind it then?

Jona
09-03-2003, 03:12 PM
That I am aware of, there is no way to prevent it... z-index probably won't work for Flash objects.

[J]ona

Khalid Ali
09-03-2003, 03:55 PM
Check this out

http://www.webreference.com/programming/javascript/form/

Hawk
09-03-2003, 04:06 PM
If U have access to put JavaScript within the page(s) in question, then U can simply get an array of the OBJECTs within the page, and temp. set them to hidden when the drop-down-menu's are being used.

var toHide = getElementByTagName('Object');

jovialjonny
09-03-2003, 04:12 PM
Cant do that hawk, they are webpages not on my domain.

Thanks all, it looks like my only solution is to either hide whatever page is being displayed (which is a bit excessive because the vast majority of them won't have flash content) or just put up with the fact that occasionally a flash piece will cause this obstruction...