Button using JS with functionality of F11 keyboard key

Discussion in 'Programming' started by cryoffalcon, Apr 26, 2012.

  1. #1
    Hi,
    I want to make a button which if pressed works as if F11 key on keyboard is pressed.
    For button html would be like this (I think)

    <button type="button" onclick="some function">FullScreen</button>

    Now I don't know what function would go in that onclick as I don't have the JS. One more thing that would be nice if the text 'FULLSCREEN' changes to 'NORMAL WINDOW' when the button is pressed, so that the user could realize that they have to press the same button again to get out of fullscreen, it would be like toggle at every click text changes from 'FULLSCREEN' to 'NORMAL WINDOW' and then if pressed again changing to 'FULLSCREEN'.
     
    cryoffalcon, Apr 26, 2012 IP
  2. spukos

    spukos Peon

    Messages:
    12
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    im not that good in programing but its quite complicated ...
     
    spukos, Apr 26, 2012 IP
  3. cryoffalcon

    cryoffalcon Peon

    Messages:
    102
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Yah you are right, it is hard ^^
     
    cryoffalcon, Apr 26, 2012 IP
  4. Arttu

    Arttu Member

    Messages:
    139
    Likes Received:
    2
    Best Answers:
    8
    Trophy Points:
    40
  5. cryoffalcon

    cryoffalcon Peon

    Messages:
    102
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    cryoffalcon, Apr 26, 2012 IP