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 8 of 8
  1. #1
    New Coder
    Join Date
    Sep 2002
    Posts
    12
    Thanks
    0
    Thanked 0 Times in 0 Posts

    F11 (channelmode) function integration

    Hi,

    I have this code that can be used to simulate the F11 function in the Internet Explorer.

    Code:
    <script type="text/javascript">
    function F11() {
    window.open("page.html", "", "channelmode");
    }
    </script>
    and you call it by adding this to a html link :
    Code:
     <a href="javascript:F11()">click here to open in channelmode</a>
    or
    Code:
    <body onload="javascript:F11()">
    the problem is that when the function was written, , it said to open "page.html" in channel mode. I want to open the page itself in channelmode onload... not "page.html" how can I modify the function?

    something like...window self open!
    thanks

  • #2
    Rex
    Rex is offline
    New Coder
    Join Date
    May 2004
    Posts
    22
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Hello Chartrandi -

    Add this code in the page source header:
    Code:
    <script type="text/javascript">
    window.onload = function()
    {
        var strQuery = location.href.match(/\?.*$/);
        if(strQuery != 'popped')
        {
            window.open(location.href + '?popped', '', 'channelmode');
        }
        else
        {
            document.body.style.visibility = 'visible';
        }
    }
    </script>
    Then, add this HTML attribute to the <body> tag:
    Code:
    style="visibility: hidden;"
    - Rex
    Sincerely,
    Rex

  • #3
    New Coder
    Join Date
    Sep 2002
    Posts
    12
    Thanks
    0
    Thanked 0 Times in 0 Posts
    the page loops

  • #4
    Regular Coder
    Join Date
    Nov 2002
    Location
    Carmel California
    Posts
    471
    Thanks
    0
    Thanked 1 Time in 1 Post
    chartrandi, the problem with your code is the function name "f11", that wont work. If you rename it to something like "Feleven" it works fine.

    Edit:
    woops never mind it does work
    Last edited by kwhubby; 05-28-2004 at 06:01 AM. Reason: woops
    Kris Hubby
    kwhubby site

  • #5
    Supreme Master coder! glenngv's Avatar
    Join Date
    Jun 2002
    Location
    Philippines
    Posts
    11,043
    Thanks
    0
    Thanked 251 Times in 247 Posts
    Do you want to open the current page in a new window in channel mode?

    function F11() {
    window.open(location.href, "", "channelmode");
    }

  • #6
    Supreme Master coder! glenngv's Avatar
    Join Date
    Jun 2002
    Location
    Philippines
    Posts
    11,043
    Thanks
    0
    Thanked 251 Times in 247 Posts
    Quote Originally Posted by kwhubby
    chartrandi, the problem with your code is the function name "f11", that wont work. If you rename it to something like "Feleven" it works fine.

    Edit:
    woops never mind it does work
    As in variables, you can name your functions with numbers as long as the first character is a letter.

  • #7
    Regular Coder
    Join Date
    Nov 2002
    Location
    Carmel California
    Posts
    471
    Thanks
    0
    Thanked 1 Time in 1 Post
    Quote Originally Posted by glenngv
    As in variables, you can name your functions with numbers as long as the first character is a letter.
    I knew that, I was just quickly testing his code and got an error from a typo I made, and posted before I relized that it did work fine because it had the letter before it.
    Kris Hubby
    kwhubby site

  • #8
    New to the CF scene
    Join Date
    Feb 2010
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts
    try using this function (it's like F11):

    function fullscreen() {
    Width=screen.availWidth;
    Height=screen.availHeight;
    window.open('myPage.html', '',
    'toolbar=no,location=no,directories=no,status=no,menubar=no,'+
    'scrollbars=1,resizable=no,copyhistory=1,width='+Width+','+
    'height='+Height+',top=0,left=0','replace');
    }


  •  

    Posting Permissions

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