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 14 of 14
  1. #1
    New to the CF scene
    Join Date
    Mar 2005
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    current window resized to full screen?

    hi

    just tried a bunch of codes to get the current window resized to completely FULL screen onload, but none worked, any suggestions please?

    thanks in advance.

    P.S. the only one which seemed to work was this one and it appears to be malicious:

    <script type="text/javascript">
    function max()
    {
    var obj = new ActiveXObject("Wscript.shell");
    obj.SendKeys("{F11}");
    }
    </script>
    </head>
    <body onload="javascript:max()">

  • #2
    Senior Coder
    Join Date
    Jun 2002
    Location
    The Netherlands, Baarn, Ut.
    Posts
    4,253
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Javascript forum

    You can probably get an answer faster on the javascript forum; if you do a bit of searching, I'm pretty sure you'll find that it has been answered already a number of times.
    Apart from that, you need to realize that it's up to the visitor to decide what window size he/she wants to use; meddling with the user's browser is not really appreciated.
    Regards,
    Ronald.
    ronaldvanderwijden.com

  • #3
    New to the CF scene
    Join Date
    Mar 2005
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts
    i did search the forum but i didnt found anything helpful, i read a window cant self resize to full screen, is that true?

  • #4
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    it can go fullscreen but only if it was opened in javascript in the first place, you could try a splash page, that had a link that opened a fullscreen window, or having an onload window open of a fullscreen window then closing the previous but even then that isn't a good idea since u would be messing with the users browser, and plus any automatic popup will more than likely be blocked by a popup blocker

  • #5
    New to the CF scene
    Join Date
    Mar 2005
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts
    thanks for your reply, but i didnt really understand, you mean i have to open the window to be self resized with javascript? actually im not using javascript there because when used, in case you are protecting from hotlinking, then the page you open with javascript cant be seen because the protection gets confused and understands you are linking the file from other site than the allowed ones so it show you an error page, thats why i want to resize in the same window that is open and not from the page which has the link to launch that window.

    what about this code?

    <script type="text/javascript">
    function max()
    {
    var obj = new ActiveXObject("Wscript.shell");
    obj.SendKeys("{F11}");
    }
    </script>
    </head>
    <body onload="javascript:max()">

  • #6
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    it works but its malicious as you already discovered partly because of the activex control that is being called, firewalls and antivirus will go off like crazy when it finds out what the script is trying to do, and an OS with SP2 will catch it like a frog catching a fly, you say it would be hotlinking from splash page, if you linking to a page on the same server as the splash page, then its not hotlinking, that is however you are linking to a paper that isn't urs, and like i said javascript full screen only
    Code:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <title>Window Open</title>
    <script type="text/javascript"><!--
    function openwin(){
    sw=screen.width;
    sh=screen.height;
    //window.open('http://www.yahoo.com','','fullscreen=yes'); //fullscreen=yes only works in IE
    // window.open('http://www.yahoo.com','','width='+sw+',height='+sh+',top=0,left=0,scrollbars=1');
    // The above is the closest you are going to get to opening a fullscreen window without being malicious
    // Using the onload will trigger popup blockers and see the window as a popup and almost always block it
    }
    //-->
    </script>
    </head>
    <body onload="openwin()">
    
    </body>
    </html>
    and because of the popup blockers this is what the splash page would be neccesary for because it doesn't seem to get blocked when its opened from a link
    Last edited by _Aerospace_Eng_; 03-15-2005 at 02:46 AM.

  • #7
    New to the CF scene
    Join Date
    Mar 2005
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts
    thanks, but that code opens a new window, and does it with javascript, then it will be caught by the hotlinking protection and will not be displayed, thats why i need to resize the filan window, doing like this the page will first open surely and then it will resize as i need.

    I tried this code with activex, it almost opens in fullscreen but it has also navigation bars and other extra stuff i want to take off, any idea about how to do it?

  • #8
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    i should have put this in my last post, u can't change the window attributes unless its opened by javascript, which is what i've been trying to tell u the last 2 posts

  • #9
    New to the CF scene
    Join Date
    Mar 2005
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I know that, thats why i dont want to open a new window but to resize the current one. i think this code is the closest one to be accurrated i have tried it and it nearly worked,

    <script type="text/javascript">
    function max()
    {
    var obj = new ActiveXObject("Wscript.shell");
    obj.SendKeys("{F11}");
    }
    </script>
    </head>
    <body onload="javascript:max()">

    but it has only one problem, search bar (in case you have installed one) navigation bar and window options (close, minimize, maximize) still appear and resting visibility to the window, that is what i want to avoid. I have warned users they have to press ALT and F4 to close the window, so there is no problem with that, any expert in this code around?

  • #10
    Regular Coder
    Join Date
    Aug 2004
    Location
    codegoboom@yahoo.com
    Posts
    999
    Thanks
    0
    Thanked 0 Times in 0 Posts
    What you need is either the InternetExplorer object, or an HTA; both of which are for 'trusted web applications'--not 'ordinary web pages', and you shouldn't rely on sendkeys too heavily either, because it's 'blind' (you can't ensure that another window will not grab focus before the sending, or what will happen if you 'miss'). Basically, these things do not work on the internet, by design.
    *this message will self destruct in n-seconds*

  • #11
    New to the CF scene
    Join Date
    Mar 2005
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts
    isnt there any alternative code? even in activex, i think its close to work fine

  • #12
    Regular Coder
    Join Date
    Aug 2004
    Location
    codegoboom@yahoo.com
    Posts
    999
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Nope.
    *this message will self destruct in n-seconds*

  • #13
    New to the CF scene
    Join Date
    Mar 2005
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts
    i believe there is a code somewhere to do that

  • #14
    Regular Coder
    Join Date
    Aug 2004
    Location
    codegoboom@yahoo.com
    Posts
    999
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Godspeed.
    *this message will self destruct in n-seconds*


  •  

    Posting Permissions

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