Search Support

Avoid support scams. We will never ask you to call or text a phone number or share personal information. Please report suspicious activity using the “Report Abuse” option.

Learn More

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 iimpendulo
  • 0 inale ngxaki
  • 1 view
  • Impendulo yokugqibela ngu 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

All Replies (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.