Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 9 of 9
  1. #1
    New Coder
    Join Date
    Nov 2004
    Posts
    78
    Thanks
    0
    Thanked 0 Times in 0 Posts

    is it possible to emulate F11 button using a link javascript

    I tried (without found a solution) to create a "text link" pointing to a javascript function with the aim to emulate the pressing of Windows F11 button (which maximize or minimize current browser window) .

    I tried and tried again also searching on google for javascript code but I still cannot find a solution .

    Do you have any idea ? it should not open a new window , it should work also in frames , it should work exactly F11 windows button . How to realize it ?

  • #2
    Regular Coder martin_narg's Avatar
    Join Date
    Jul 2002
    Location
    Chamonix, France
    Posts
    600
    Thanks
    1
    Thanked 3 Times in 3 Posts
    Quote Originally Posted by graziano
    ...emulate the pressing of Windows F11 button (which maximize or minimize current browser window) .
    F11 doesn't minimize/maximize it full-screens the window...

    Look into window.open() using the fullscreen parameter as a user-inititated event.

    m_n
    "Cos it's strange isn't it. You stand in the middle of a library and go 'Aaaaaaaaaaaaaaaaggggggghhhhhhh!'
    and everybody just stares at you. But you do the same in an aeroplane, and everybody joins in."
    -Tommy Cooper

  • #3
    Regular Coder
    Join Date
    Aug 2005
    Location
    Toronto, ON, Canada
    Posts
    231
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Javascript emulated key events would be a high security risk. For that reason they have not been inplemented.
    rm -f /

  • #4
    Master Coder felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, Australia
    Posts
    6,472
    Thanks
    0
    Thanked 634 Times in 624 Posts
    The window.open method can only open a new window full screen in some web browsers. The parameter to do that is not part of the standards and is therefore not recognised by most browsers.
    Stephen
    Learn Modern JavaScript - http://javascriptexample.net/
    Helping others to solve their computer problem at http://www.felgall.com/

    Don't forget to start your JavaScript code with "use strict"; which makes it easier to find errors in your code.

  • #5
    Regular Coder martin_narg's Avatar
    Join Date
    Jul 2002
    Location
    Chamonix, France
    Posts
    600
    Thanks
    1
    Thanked 3 Times in 3 Posts
    Quote Originally Posted by felgall
    The window.open method can only open a new window full screen in some web browsers. The parameter to do that is not part of the standards and is therefore not recognised by most browsers.
    Yep, I agree, but it's the closest thing (even if not fully supported) to the F11 keypress.

    m_n
    "Cos it's strange isn't it. You stand in the middle of a library and go 'Aaaaaaaaaaaaaaaaggggggghhhhhhh!'
    and everybody just stares at you. But you do the same in an aeroplane, and everybody joins in."
    -Tommy Cooper

  • #6
    New to the CF scene
    Join Date
    Sep 2005
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Hi;
    Follow this link and i think it might be what you are looking for,as said it uses the open window method so therefore it only works in MSIE:
    http://www.javascript-page.com/open2full.html

    I hope this helps,
    Simply plain
    Last edited by Simply plain; 09-18-2005 at 10:40 AM.

  • #7
    Senior Coder
    Join Date
    Feb 2003
    Posts
    1,665
    Thanks
    0
    Thanked 27 Times in 25 Posts
    Quote Originally Posted by Simply plain
    Hi;
    Follow this link and i think it might be what you are looking for,as said it uses the open window method so therefore it only works in MSIE:
    http://www.javascript-page.com/open2full.html

    I hope this helps,
    Simply plain
    Most, if not all, js-enabled UAs support the window.open method. It's the fullscreen attribute of the window features that is IE-specific.

  • #8
    jkd
    jkd is offline
    Senior Coder jkd's Avatar
    Join Date
    May 2002
    Location
    metro DC
    Posts
    3,163
    Thanks
    1
    Thanked 18 Times in 18 Posts
    Quote Originally Posted by rm-f
    Javascript emulated key events would be a high security risk. For that reason they have not been inplemented.
    You can fire key events in Gecko and it's DOM3 implementation of TextEvent plus dispatchEvent(). However, it operates below the UI level (afaik), so it's safe.

  • #9
    Regular Coder
    Join Date
    Aug 2005
    Location
    Toronto, ON, Canada
    Posts
    231
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by jkd
    You can fire key events in Gecko and it's DOM3 implementation of TextEvent plus dispatchEvent(). However, it operates below the UI level (afaik), so it's safe.

    I would appreciate if you could post a sample code to emulate ENTER or F11 keypress (if possible for Mozilla and/or IE)
    rm -f /


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •