搜索 | 用户支持

防范以用户支持为名的诈骗。我们绝对不会要求您拨打电话或发送短信,及提供任何个人信息。请使用“举报滥用”选项报告涉及违规的行为。

详细了解

How can I force focus from flash to another plugin app in FireFox such as with the e.focus() Java Script command in Internet Explorer

  • 3 个回答
  • 0 人有此问题
  • 1 次查看
  • 最后回复者为 the-edmeister

more options

Can you force focus from a Flash app to another plugin such as Unity3d using a JS command similar to e.focus() which works in Internet explorer. The following code works in IE, but not FireFox? Any solution would be helpful. Is it even possible?

function hideSWF(){
     e=document.getElementById("flash_content");
     e.style.width = 1 + 'px';
     e.style.height = 1 + 'px';
     e=document.getElementById("u3dobjmsiediv_unity");
     e.focus() ;
  }
  function showSWF() {
     e=document.getElementById("flash_content");
     e.style.width = gameWidth + 'px';
     e.style.height = gameHeight + 'px';
     e.focus() ;
  }

This happened

Every time Firefox opened

Always existed when switching from Flash app to a different app.

User Agent

Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/533.4 (KHTML, like Gecko) Chrome/5.0.375.99 Safari/533.4

Can you force focus from a Flash app to another plugin such as Unity3d using a JS command similar to e.focus() which works in Internet explorer. The following code works in IE, but not FireFox? Any solution would be helpful. Is it even possible? function hideSWF(){ e=document.getElementById("flash_content"); e.style.width = 1 + 'px'; e.style.height = 1 + 'px'; e=document.getElementById("u3dobjmsiediv_unity"); e.focus() ; } function showSWF() { e=document.getElementById("flash_content"); e.style.width = gameWidth + 'px'; e.style.height = gameHeight + 'px'; e.focus() ; } == This happened == Every time Firefox opened == Always existed when switching from Flash app to a different app. == == User Agent == Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/533.4 (KHTML, like Gecko) Chrome/5.0.375.99 Safari/533.4

所有回复 (3)

more options

Try posting at the Web Development / Standards Evangelism forum at MozillaZine. The helpers over there are more knowledgeable about web page development issues with Firefox. http://forums.mozillazine.org/viewforum.php?f=25 You'll need to register and login to be able to post in that forum.

more options

So I'm hearing firefox does not support e.focus() in js? Is there a comparable function? I'll ask in the other forum, but it seem like Mozilla could answer what javascript functions are supported.

more options

No, I am saying that this isn't the forum for help with that. This forum is for Firefox user support, and the helpers in this forum aren't versed in development issues like that - we're volunteers, not Mozilla developers and don't work for Mozilla. You are better off asking about that in a forum where other web site developers do support.