SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    Free your mind Toly's Avatar
    Join Date
    Sep 2001
    Location
    Panama
    Posts
    2,181
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Full screen script

    Hello,

    I think this is something that can be done with javascript.... anyways as you may know, when you surf the net and press the F11 key on your keyboard, you get a full screen view.

    I would like to have some sort of link or button on my site that when users click on it, they will get full screen and then another link for getting the screen back to normal view.

    Any help would be appreciate.

    Thanks.
    Community Guidelines | Community FAQ

    "He that is kind is free, though he is a slave;
    he that is evil is a slave, though he be a king." - St. Augustine

  2. #2
    Posts rarely lloydi's Avatar
    Join Date
    Jan 2002
    Location
    Swindon UK
    Posts
    620
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    This should do ya ...

    <script language="JavaScript"><!--
    function full(url) {
    if (document.all) {
    window.open(url,'windowName','fullscreen=yes');
    return false;
    }
    return true;
    }
    //--></script>

    <a href="default.htm" onClick="full(this.href)">Open full screen</a>
    Build Your Own Web Site the Right Way!
    A beginners' HTML/CSS book with web standards at its heart
    The Ultimate HTML Reference
    A complete reference, in glorious hardback

  3. #3
    Free your mind Toly's Avatar
    Join Date
    Sep 2001
    Location
    Panama
    Posts
    2,181
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks for the script.

    It works great but i noticed that the sript pops up a new window and make it full screen. I was wondering if there's a chance to make the same window with the link "Open full screen" to go full screen.

    Also is there another script which will allow me to exit the full screen mode.

    Thanks in advance.
    Community Guidelines | Community FAQ

    "He that is kind is free, though he is a slave;
    he that is evil is a slave, though he be a king." - St. Augustine

  4. #4
    Posts rarely lloydi's Avatar
    Join Date
    Jan 2002
    Location
    Swindon UK
    Posts
    620
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    To my knowledge, you can't change an existing window in this way. It could be abused - many people will argue that forcing a screen to full screen is a bit of a nasty thing to do without providing a warning. Many people do not know how to close the window without the usual UI widgets at the top.

    I personally wouldn't use the full screen (but still provided the script for you). Hey - I have handed you a buzzing chainsaw, it's up to you which end you choose to handle and whic you choose to wield!
    Build Your Own Web Site the Right Way!
    A beginners' HTML/CSS book with web standards at its heart
    The Ultimate HTML Reference
    A complete reference, in glorious hardback

  5. #5
    SitePoint Member
    Join Date
    Feb 2002
    Posts
    12
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Full screen script

    Hello there,

    The concept is absolutely right.You can't open the main page with the properties that you want.That is because the security model of the browsers.

    Kindest Regards.

    Alex


Bookmarks

Posting Permissions

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