Hi !
I have a flash movie that is embedd in an html page, and I want it to have
the keyboard focus as soon as the page is loaded.
With the following HTML code, it works fine on IE and Firefox, but not on
WebKit.
<HTML>
<body onload="document.getElementById('VIDEO').focus();">
<OBJECT
wmode="opaque"
id="VIDEO" name="VIDEO"
width="800" height="600"
style="position:absolute; left:0;top:0;"
type="application/x-shockwave-flash"
data="mt.swf">
<PARAM NAME="MOVIE" VALUE="mt.swf">
</OBJECT>
</body>
</HTML>
The "onLoad" event is well received and the
"document.getElementById('VIDEO')" works. Indeed, if I replace "<body
onload="document.getElementById('VIDEO').focus();">" with "<body
onload="alert(document.getElementById('VIDEO').data)">" the alert returns
the name of the file to be played.
So, looks like the ".focus()" does'nt actually give focus to the embed flash
video...
Am I missing something in the way to embed the flash video or is it a
limitation of webkit ??
I also read during my searches on google, that giving the focus to a flash
video was quite impossible from a non-IE browser, but these posts were
sometime outdated (2005-2006......)
But since it works now on a firefox 3.0.4, I wonder why it doesn't work on
WebKit too.
Thank you to help me making the light about all this.
PS : I'm running a *WebKit r44815* on *Fedora10*.
--
matt
_______________________________________________
webkit-help mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-help