...

View Full Version : F11 (channelmode) function integration



chartrandi
05-27-2004, 02:10 PM
Hi,

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



<script type="text/javascript">
function F11() {
window.open("page.html", "", "channelmode");
}
</script>



and you call it by adding this to a html link :

<a href="javascript:F11()">click here to open in channelmode</a>

or


<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

Rex
05-27-2004, 04:39 PM
Hello Chartrandi -

Add this code in the page source header:

<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:

style="visibility: hidden;"

- Rex

chartrandi
05-27-2004, 04:46 PM
the page loops :(

kwhubby
05-28-2004, 06:53 AM
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

glenngv
05-28-2004, 06:54 AM
Do you want to open the current page in a new window in channel mode?

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

glenngv
05-28-2004, 06:59 AM
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.

kwhubby
05-28-2004, 07:04 AM
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. :o

myusercr
02-24-2010, 11:50 PM
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');
}



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum