Solved

Manipulate the browser (Force F11)

Posted on 2001-08-21
42
1,684 Views
Last Modified: 2008-01-16
Hi,

1) How can I programmatically in an ASP page force the browser to go full screen ?  (Same as pressing F11) by the user.

2) How can I force the browser to auto-hide the toolbar when in Full Screen mode ?

Kind regards,
Yves Vindevogel


0
Comment
Question by:vindevogel
  • 11
  • 9
  • 8
  • +3
42 Comments
 
LVL 7

Expert Comment

by:John844
ID: 6410694
unless you open a new window, you can't.  When you open a new window, you can specify size and toolbars to show.
John
0
 
LVL 28

Expert Comment

by:AzraSound
ID: 6410696
You must open a new window, example:
http://www.bytchandbytes.com/ezscripts/window/form2.html
0
 
LVL 7

Expert Comment

by:John844
ID: 6410741
here is some more info about the options available when opening a new window

     var sOptions = "";
     
     sOptions += 'width=600'                    //outter width of window in pixels
     sOptions += ',height=400'               //outter height of window in pixels
     sOptions += ',toolbar=yes'               //"back", "forward" and other buttons in the row
     sOptions += ',location=' + page;          //field displaying the current URL
     //sOptions += ',directories=??????'     // "What's New" and other buttons in the row
     sOptions += ',status=yes'               //Statusbar at the bottom of window
     sOptions += ',menubar=yes'               //menubar at top of window
     sOptions += ',scrollbars=yes'          //displays scrollbars if the document is larger than window
     sOptions += ',resizable=yes'               //allow resizing by dragging

the options string could then be used in the window.open statement
0
 
LVL 18

Expert Comment

by:bruno
ID: 6411096
unless this is for a kiosk or something similar, i would NOT recommend it.  user's do not take kindly to losing the ability to navigate and use the toolbar.

if it IS for a kiosk environment, there are other solutions, besides doing it programmatically.

BRUNO
0
 
LVL 4

Author Comment

by:vindevogel
ID: 6411327
It's not for a kiosk app, but for our own apps ...
We develop all our apps browser based using a combination of VB, XML, ASP and XSL.

When the user logs into our "homepage", the browser may go full screen.  He/she doesn't need the toolbar anymore.


Is there a solution for the auto-hide ?
0
 
LVL 2

Expert Comment

by:turbosig
ID: 6412114
The exact Answer to your question is:  IMPOSSIBLE

These functions were removed in the latest versions.
0
 
LVL 4

Author Comment

by:vindevogel
ID: 6412564
Hmm, all of these solutions open the new window covering my complete screen, BUT, that's still not the same as having pressed "F11".

Pressing F11 does some more things ...
Please experts, try that and see the difference.

I cannot accept any of these answers.
0
 
LVL 4

Author Comment

by:vindevogel
ID: 6412585
Bruno: I know some products like "Netshift" that do this, I do not need that ... Just a simulation of "F11"
0
 
LVL 2

Expert Comment

by:turbosig
ID: 6413136
vind..

This feature was SPECIFICALLY removed from IE so that it is NOT possible. The reasons were abuse of this functionality.

Lets say this WAS possible and you did not offer a "close window" option on the page.  An inexperienced user may be baffled as to how to close the window.

Microsofts site EXPLICITLY explains that this keycode is NOT Trappable, therefore unmanipulatable.

~Turbo
0
 
LVL 28

Expert Comment

by:AzraSound
ID: 6413277
It would require an activeX solution now.
0
 
LVL 18

Expert Comment

by:bruno
ID: 6413522
vind,

i was not talking about an outside app, you can append "-k" to the properties line of a IE shortcut...

ex:  "C:\Program Files\Plus!\Microsoft Internet\IEXPLORE.EXE" -k


this will open the browser in "kiosk" mode.... but you lose ALL functionality...other than keyboard shortcuts...ie: ctrl-o to open a URL, or alt-left arrow to go back...

but it doesn't sound like this is what you need.

can you explain WHAT functionality F11 offers that you are trying to maintain that the solutions posed have not offered?

BRUNO
0
 
LVL 18

Expert Comment

by:bruno
ID: 6413526
btw:  if you try that kiosk thing, the easiest way to close the window is alt-F4....somepeople forget that
0
 
LVL 4

Author Comment

by:vindevogel
ID: 6413564
Bruno:
I have my webpage really all the way over my screen, even without a border or title bars or whatever .... Really nothing to see of IE.  It even overrides the start bar of Windows.

Turbo:
Sorry, but you're probably right.  But, it's not because the Mickeys don't allow me to do it, I won't do it  ;-)
In VB I can't do a lot of stuff with the things Microsoft puts in the manuals, altough a lot of Experts agree with me that you can do almost everything with VB.  (As long as VB does not have to be Virtual Blowj..)

AzraSound:
Euh, you got a clue on how to do it ?
0
 
LVL 4

Author Comment

by:vindevogel
ID: 6413590
hmm, I do like the -K option ....
Even better than the F11 stuff.

A way to force that ?
0
 
LVL 18

Expert Comment

by:bruno
ID: 6413753
can't force it upon the user, no....just on whatever machine you have, that's why it's good for kiosk use.
0
 
LVL 2

Expert Comment

by:turbosig
ID: 6413994
Well if you can find a way to force an action equivilent to the F11 key, I would pay big money for that, hell, I would give away all my points.

We have been wanting that ability ever since they rashed IE 3.0.  Seems IE and Windows together serve as a powerful force, and if Microsoft says you won't do it, I would PAY to see it done.

short of re-writing IE let me know.
0
 
LVL 9

Expert Comment

by:AlfaNoMore
ID: 6421292
Only works in IE, but use:

window.open("blah.html",pageName,"width=...,height=.....etc......,fullscreen=1);

should do the job.

Daniel Newman.

0
 
LVL 2

Expert Comment

by:turbosig
ID: 6421817
AlfaNoMore,

Actually onload event not a new window.
0
 
LVL 9

Expert Comment

by:AlfaNoMore
ID: 6421979
I suppose only microsoft have the answer to this. I'm sure using Direct-X, you could do it. Maybe you'd need to get a reference to the existing IE object (your browser), and probably do something like objDirectXIE.FullScreenMode or something. It's got to be availabale. But not using JavaScript.
0
 
LVL 9

Expert Comment

by:AlfaNoMore
ID: 6422000
I'd like all your points please turbosig!!!!



<SCRIPT LANGUAGE="vbscript">
<!--Sub window_onLoad()
dim exp
set exp=Explorer
exp.fullscreen=true
end sub-->
</SCRIPT>

Haven't tried it, and it only works for IE, but looks good.

Daniel.
0
 
LVL 2

Expert Comment

by:turbosig
ID: 6422226
daniel, won't work.
0
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
LVL 4

Author Comment

by:vindevogel
ID: 6422259
Daniel, most experts do not log into this side to have a laugh...

set exp = explorer .... ?

Have you been smoking ??
0
 
LVL 4

Author Comment

by:vindevogel
ID: 6422289
Hmm, iexplore.exe is surely not an ActiveX exe.
Does anyone know what DLL's are accessible ?
Or what DLL's IEplore uses ?
0
 
LVL 4

Author Comment

by:vindevogel
ID: 6422338
Hmm, thinking ...

In VB, you can load the "internet controls"
One of them is the "webbrowser"

This is IE without the borders ...
And has a property "FullScreen"

Maybe we can hack our way around it ....
0
 
LVL 9

Expert Comment

by:AlfaNoMore
ID: 6422384
Wasn't my code. I found it. And I did say I hadn't tested it. But you guys seem to be thinking about accessing IE's properties and methods directly, which is kinda my suggestion?
0
 
LVL 28

Expert Comment

by:AzraSound
ID: 6422389
This is how you can loop through open IE windows, but the FullScreen property is a property of the InternetExplorer object, and looping through the shell windows only returns a reference to the IWebBrowser2 interface, I believe, which does not exude that property.  This is not a limitation in VB, however...


<html>
<script language="VBScript">
Sub CallMe()
On Error Resume Next
Dim shWin, i
Set shWin = CreateObject("Shell.Application")
For i = 0 To shWin.Windows.Count - 1
    window.alert(shWin.Windows(i).LocationURL)
Next

Set shWin = Nothing
End Sub
</script>

<body onload="CallMe">
</body>
</html>
0
 
LVL 28

Expert Comment

by:AzraSound
ID: 6423089
Just found out that you can get a reference to the InternetExplorer object itself via the parent property of the WebBrowser interface:

<html>
<script language="VBScript">
Sub CallMe()
On Error Resume Next
Dim shWin, i
Set shWin = CreateObject("Shell.Application")
For i = 0 To shWin.Windows.Count - 1
    If shWin.Windows(i).LocationURL = "http://www.experts-exchange.com/jsp/qShow.jsp?ta=asp&qid=20171764" Then
        shWin.Windows(i).Parent.FullScreen = True
    End If
Next

Set shWin = Nothing
End Sub
</script>

<body onload="CallMe">
</body>
</html>
0
 
LVL 2

Expert Comment

by:turbosig
ID: 6423151
AzraSound, Couldn't get that to work either?? -- Now it sounds like I am the one who asked this question.
0
 
LVL 18

Expert Comment

by:bruno
ID: 6423177
turbo,

just a guess, but you might need to check your options to make sure you allow activex to run?

bruno
0
 
LVL 28

Expert Comment

by:AzraSound
ID: 6423212
Yes it will require you allow ActiveX to run, and, you will get a popup informing you that a control is running.  Unless you have your security set for "everything goes", this will be the case.
0
 
LVL 18

Expert Comment

by:bruno
ID: 6423219
a good guess on my part then  :-)  i think you were helping me on something once where i had the same problem, if i remember correctly.

BRUNO
0
 
LVL 2

Expert Comment

by:turbosig
ID: 6423260
Maybe you need IE 5.5?
0
 
LVL 28

Expert Comment

by:AzraSound
ID: 6423276
Shouldnt...the ShellWindows automation object should have been available since IE4, maybe even IE3.
0
 
LVL 28

Expert Comment

by:AzraSound
ID: 6423279
This site claims IE4, but some issues that may arise with Win95 and winNT with earlier versions of the Shell

http://www.borncity.com/WSHBazaar/WSHShellWin.htm
0
 
LVL 2

Expert Comment

by:turbosig
ID: 6423400
Possibly, we are on NT machines?  Weird, I have no problems with ActiveX on other apps???

Maybe I will try this at home?

If it does work, I will keep true to my promise of awarding dome "effort" points.

:)

Now this is the kind of place all developers should hang out..
0
 
LVL 18

Accepted Solution

by:
bruno earned 75 total points
ID: 6434296
vind,

check this site out....this is similiar to what you want to do?  you can view the javascript in the source...

http://www.turnofftheinternet.com/


BRUNO
0
 
LVL 18

Expert Comment

by:bruno
ID: 6458665
vind,

how about coming back and giving us an update?

did the code from that last site i posted help you out at all?


BRUNO
0
 
LVL 4

Author Comment

by:vindevogel
ID: 6462497
Brunobear: this code seems to work indeed.

When I added window.close (); also, it even closed my window before opening the new one :-))

But, ....

Since when do browsers ask "this page wants to close the window, are you sure ?"   Is this a IE6 "feature" ?

Gonna accept yours bruno .... the "Fullscreen" in the features seems to pull the trick.
0
 
LVL 4

Author Comment

by:vindevogel
ID: 6462500
<html>
     <head>
          <script language="JavaScript">
               function fullScreen(URL)
               {
                    window.parent.close ();
                    window.open (URL, '', 'fullscreen=yes, width="110%", height="100%", menubar=no, toolbar=no, scrollbars=no, resizable=no');
               };
               
          </script>
     </head>
     <body>

          <p align="center">
               <a style="CURSOR: hand" onclick="fullScreen('home.asp')"><U>Enter the site</U></a>
          </p>
     </body>
</HTML>



This is my code now ... works fine  :-))
Thanks Bruno


(Sorry guys, i'd forgotten about this question)
0
 
LVL 28

Expert Comment

by:AzraSound
ID: 6462706
>>Since when do browsers ask "this page wants to close the window, are you sure ?"

It always asks if its the original window.  You can only close windows you spawn...otherwise, people could just be browsing along and have sites shut down their browser window.
0
 
LVL 4

Author Comment

by:vindevogel
ID: 6463948
Hmmmm ... do you think there's a way around this ?
If you think it could be done, i'm going to post a new question on that.
0
 
LVL 18

Expert Comment

by:bruno
ID: 6464630
thanks for the A vind, as far as your new question I don't think it can be done for the reason Azra stated.  You can easily close windows that you have spawned using javascript.  the easy was i've remembered is if i opened the window with javascript, then i can close it with javascript with no pop up message.  not sure how your site works, but if you can open the window before with javascript as well, you should be able to close it with javascript....


BRUNO
0

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

I recently decide that I needed a way to make my pages scream on the net.   While searching around how I can accomplish this I stumbled across a great article that stated "minimize the server requests." I got to thinking, hey, I use more than one…
I would like to start this tip/trick by saying Thank You, to all who said that this could not be done, as it forced me to make sure that it could be accomplished. :) To start, I want to make sure everyone understands the importance of utilizing p…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now