Connecting Tech Pros Worldwide Forums | Help | Site Map

F11 Keyboard Code Via Javascript Not Blocked By Browser Pop-Up Blocker- Possible?

Newbie
 
Join Date: Nov 2008
Location: Israel
Posts: 1
#1: Nov 16 '08
Hello,
My question is simple and I have not seen an answer so far having surfed the web endlessly.

I run a Kids Flash Games Website:
http://www.doron-zur.com

Some of the games require Full Screen View.
I do not expect players arriving at my Website to hit the F11 Keyboard - most of them will not do so.

I want to make their life easier by writing adequate code instead which will load my Website in FULL SCREEN VIEW.

The harshness of the browser pop up blocker prevents my javascript code from using the following code:

Expand|Select|Wrap|Line Numbers
  1. <script type="text/javascript">
  2. <!--
  3. function popup(url)
  4. {
  5.  params  = 'width='+screen.width;
  6.  params += ', height='+screen.height;
  7.  params += ', top=0, left=0'
  8.  params += ', fullscreen=yes';
  9.  
  10.  newwin=window.open(url,'windowname4', params);
  11.  if (window.focus) {newwin.focus()}
  12.  return false;
  13. }
  14. // -->
  15. </script>
  16.  
  17. <a href="javascript: void(0)"
  18.    onclick="popup('http://www.doron-zur.com/')">Fullscreen popup window
  19. </a>
  20.  
Is there an expert amongst you people of the Bytes Forum who can write the F11 Keyboard code instead - which I can place inside my Website's Home Page and thus make life easier for my Website's visitors?
Thank you all.

Doron Zur.

acoder's Avatar
Site Moderator
 
Join Date: Nov 2006
Location: UK
Posts: 14,581
#2: Nov 17 '08

re: F11 Keyboard Code Via Javascript Not Blocked By Browser Pop-Up Blocker- Possible?


fullscreen is not supported in most browsers. See Window functionality features (window.open()) (lower down for fullscreen).

To avoid this problem, inform the user in a FAQ or a help link how they can increase the size of the browser and how they can enable pop-ups.
Reply