473,378 Members | 1,527 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

JS to switch to full page view (F11 key)

SPG
Hi,

We have a web app that is IE dependant.

We now have a requirement to have a button on one of our menus to force the
page into full screen view as if the client pressed F11. (It'll do other
things like hide some of our frames and other screen data too, but that is
the easy part.)

We cannot re-load the screen using window.open(blah), it has to be done as
if they pressed F11.

I have googled this a bit and have only found psuedo solutions (Like just
resizing the screen to fit the resolutions etc).

Was wondering if anyone out there has managed to do this at all?

Steve
Jul 23 '05 #1
5 19919
On Tue, 16 Nov 2004 13:27:29 GMT, "SPG"
<st*******************@nopoo.blueyonder.co.uk> wrote:
We now have a requirement to have a button on one of our menus to force the
page into full screen view as if the client pressed F11. (It'll do other
things like hide some of our frames and other screen data too, but that is
the easy part.)

Was wondering if anyone out there has managed to do this at all?


Only by using Zeepe

http://www.meadroid.com/zeepe/

Jim.
Jul 23 '05 #2
SPG
Hmm..

Didn't want to use a 3rd party kit.. Banks don't like them!

Sort of did it in a demo by doing this:

<html>
<head>
<SCRIPT LANGUAGE=VBScript>
<!-- //
Dim bState

Function SwitchView()
bState = not bState
Set objInetExp = CreateObject("InternetExplorer.application")
objInetExp.TheaterMode=bState
End Function
// -->
</SCRIPT>

</head>
<body>
<input type="button" value="Switch" onclick="SwitchView()">
</body>

But it still seems to open a new blank page instead of effecting the
existing one. I think I will have a play with this obekct and see if I can
specify the window to effect.

Steve
"Jim Ley" <ji*@jibbering.com> wrote in message
news:41***************@news.individual.net...
On Tue, 16 Nov 2004 13:27:29 GMT, "SPG"
<st*******************@nopoo.blueyonder.co.uk> wrote:
We now have a requirement to have a button on one of our menus to force
the
page into full screen view as if the client pressed F11. (It'll do other
things like hide some of our frames and other screen data too, but that is
the easy part.)

Was wondering if anyone out there has managed to do this at all?


Only by using Zeepe

http://www.meadroid.com/zeepe/

Jim.

Jul 23 '05 #3
On Tue, 16 Nov 2004 14:47:38 GMT, "SPG"
<st*******************@nopoo.blueyonder.co.uk> wrote:
But it still seems to open a new blank page instead of effecting the
existing one. I think I will have a play with this obekct and see if I can
specify the window to effect.


The amount of script to do it to the existing window would be very
significant, you can't create a new object, you'll need to get a
reference to the existing one.

I've also never seen a bank which allows full unreserved script
priviliges to an intranet app, but don't accept the 3rd party app, in
fact there's a good chance they're using meadco stuff anyway, it being
used in print workflows the world over.

Jim.
Jul 23 '05 #4
SPG wrote:
Hmm..

Didn't want to use a 3rd party kit.. Banks don't like them!

Sort of did it in a demo by doing this:

<html>
<head>
<SCRIPT LANGUAGE=VBScript>
<!-- //
Dim bState

Function SwitchView()
bState = not bState
Set objInetExp = CreateObject("InternetExplorer.application")
objInetExp.TheaterMode=bState
End Function
// -->
Why are you using JavaScript comments in a VBScript?
</SCRIPT>

</head>
<body>
<input type="button" value="Switch" onclick="SwitchView()">
</body>

But it still seems to open a new blank page instead of effecting the
existing one. I think I will have a play with this obekct and see if I can
specify the window to effect.


There is already a key that does what you want (F11). Why not educate users to
use that already provided functionality, then trap when they do it:

<div style="position:absolute;width:100%;text-align:right;top:0px;">Hit F11 to
maximize</div>
<script type="text/javascript">
window.onresize = function() {
if (window.screenLeft < 0) {
alert('fullscreened');
} else {
alert('windowed');
}
}
</script>

Note when the window is fullscreened, you get two alert()s and when the window
is windowed, you get three. So you'll need to set a flag to only handle the
event (and remove menus or whatever else you want to do) once.

Alternatively (and probably better):

<div style="position:absolute;width:100%;text-align:right;top:0px;">Hit F11 to
maximize</div>
<script type="text/javascript">
document.onkeyup = function() {
if (event.keyCode == 122) {
if (window.screenLeft < 0) {
alert('fullscreened');
} else {
alert('windowed');
}
}
}
</script>

Also note the assumption that window.screenLeft is negative when the window is
fullscreened. This assumption needs to be tested. There may be a better way to
determine what state the window is in.

--
Grant Wagner <gw*****@agricoreunited.com>
comp.lang.javascript FAQ - http://jibbering.com/faq

Jul 23 '05 #5
In article <5f******************@text.news.blueyonder.co.uk >,
st*******************@nopoo.blueyonder.co.uk enlightened us with...
Hi,

We have a web app that is IE dependant.

We now have a requirement to have a button on one of our menus to force the
page into full screen view as if the client pressed F11.


IE removed that functionality due to abuse.
Here are a few solutions to kiosk mode provided by MS.
<URL: http://support.microsoft.com/kb/q166367/>

--
--
~kaeli~
In democracy your vote counts. In feudalism your count votes.
http://www.ipwebdesign.net/wildAtHeart
http://www.ipwebdesign.net/kaelisSpace

Jul 23 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Prakash Wadhwani | last post by:
Is there any EASY way to highlight a full row in a continuous form so that as i navigate up & down the table/continuous form using the arrow keys, the entire line (all fields) get highlighted ? ...
2
by: orekin | last post by:
Hi My program is a C# Windows application and I am using the following code to open an IE window: Process p = new Process(); p.StartInfo.FileName = "iexplore.exe"; p.StartInfo.WindowStyle =...
9
by: Jensen bredal | last post by:
Is there any way i can view my web page in full screen mode? F11 still hhas the internet explorer tool bar. Many thanks in advance JB
11
by: Richard | last post by:
Dear All, Does someone have a clue as to how you can get a form to show show itself "Full Screen"? Without Taskbar just a Form. Like Internet Explore if you press F11? Really need a solution...
2
by: emlimeng | last post by:
Hi everyone It is maybe a questions asked many times. I am trying to limite users' access to Database Windows to improve security. I am working on an Access Data Project in Access 2000 format as...
1
by: imtmub | last post by:
How to switch design while working on reports or form. Actually i forgot the shortcut key. I remember something like ctrl+F11, but its not shift key while starting DB.
8
by: Sham | last post by:
I am trying to perform the following query on a table that has been indexed using Full Text Search. The table contains multiple columns than have been indexed. (Below, all xml columns are...
1
by: Y. Sommer | last post by:
Hi, I have an issue where I have an MDE file, when I open it for the first time, the F11 key is working fine, but if I close the file and reopen it, the F11 doesn't work. Any ideas what is...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.