/    Sign up×
Community /Pin to ProfileBookmark

document.getElementById(‘flv’).onclick=function(){alert(‘test’)}

document.write(…) the flowplayer object with id=flv (IE7 patent workaround)
document.getElementById(‘flv’).onclick=function(){alert(‘test’)}

Works in FF but in IE7 javascript onclick event’s get blocked by flash player ?

to post a comment
JavaScript

2 Comments(s)

Copy linkTweet thisAlerts:
@ZeroKilledMar 12.2008 — i guess any DOM compliant browser will work as well. that may be due to the way event propagate through the elements reaching the element that triggered the event. the standard event model specify that event propagate from top element (on a web document that is the HTML element) following the path until the element that triggered the event, and then back to the top. sadly, msie doesn't implement that specification, so, it only bubble (from element to top).

so, i guess that when you click on the flash content, the focus move to that flash object, not to the flash element (ebmed or object element). as far as i know, event triggered on flash isn't reported to the web document. in resume, i'm almost sure there nothing you can do about it.
Copy linkTweet thisAlerts:
@gert_cuykensauthorMar 13.2008 — well i got lucky onfocus seem to be working in IE7 ?
×

Success!

Help @gert_cuykens spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.5,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,

tipper: @Samric24,
tipped: article
amount: 1000 SATS,
)...