Welcome to WebmasterWorld Guest from 34.228.30.69

Forum Moderators: open

Message Too Old, No Replies

How to make IE full screen by programing

     
1:11 am on Oct 12, 2004 (gmt 0)

New User

10+ Year Member

joined:Oct 5, 2004
posts:27
votes: 0


Hi, everybody. Need your help again. Thanks!

Suppose there is a button on page, when I clicked it, my IE should become full screen just like I pressed F11. How can I write script for this?

Thanks for your help, have a nice day!

8:49 am on Oct 12, 2004 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Apr 15, 2004
posts:2047
votes: 0


Totally impossible.
(although I heard a report once that some renegades were accepting an F11 keycode).
People are always asking how to do this, and the answer could well be "Have you ever seen a webpage that can?"
9:12 am on Oct 12, 2004 (gmt 0)

New User

10+ Year Member

joined:Oct 5, 2004
posts:27
votes: 0


Sure, I have never seen a page can do that.

Thank you, what I want to make is just a toy Programe. So I want to add some funny function to a simple page.

Haha, thank you, have a nice day!

11:43 am on Oct 12, 2004 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Apr 15, 2004
posts:2047
votes: 0


In that case, I shouldn't be so negative.
When you're playing on home turf, you're paying the referee.

Here's a couple of options (Windows-only):

Assuming that you have your app as myApp.htm, on the desktop..

#1 Save this one-liner as:

myApp.bat

start iexplore.exe -k "C:\windows\desktop\myApp.htm"

Use the .bat file as a shortcut to your app.
The -k switch opens IE in kiosk mode.


[b]#2[/b] Turn your file into an HTA

Here's an example. Save it with the extension, .hta

<html>
<head>
<!--
fullscreen but with title bar:
caption = "yes"
-->
<hta:application
showintaskbar = "yes"
caption = "no"
border = "thick"
contextmenu = "yes"
icon = "path_to_icon.ico"
innerborder = "no"
scroll = "no"
singleinstance = "yes"
resizable = "yes"
windowState = "maximize"
>
<title>&nbsp;List Editor</title>
</head>
<body scroll="no">
<p>hello</p>
</body>
</html>

With an HTA, you have full access to your file system, for doing/messing up all kinds of things with Javascript.

2:29 pm on Oct 12, 2004 (gmt 0)

New User

10+ Year Member

joined:Oct 5, 2004
posts:27
votes: 0


HiŁ¬Thank you, I'll try it later. Sorry to say that I have never used hta before. Thanks for your help, have a nice day!
2:56 pm on Oct 12, 2004 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:May 22, 2002
posts:1001
votes: 0


This code should do it (not my own, done by Kada, downloadable as a Dreamweaver MX extension from macromedia.com):

<script language="JavaScript">
<!--
function kada_AutoResWindow(theURL,winName,width,height,features) {
if(window.screen){
per_ancho=(width/800)*100;//porcentaje screen-ancho
per_alto=(height/width)*100;//porcentaje de ancho-alto
win_ancho=(screen.width*per_ancho)/100;//ancho de la ventana
win_alto=(win_ancho*per_alto)/100;//alto de la ventana
x=(screen.width-win_ancho)/2;//centra x
y=(screen.height-win_alto)/2;//centra y
}else{// si el buscador es 4-- queda todo igual :(
x=0;
y=0;
win_ancho=w;
win_alto=y;
}
winfeatures=("top="+y+",left="+x+",width="+win_ancho+",height="+win_alto+","+features);
window.open(theURL,winName,winfeatures);
}
//-->
</script>

<input name="submit" type="submit" onClick="kada_AutoResWindow('main.cfm','MyWindow','800','600','toolbar=no,location=no,status=no,menubar=no,scrollbars=no,resizable=no')">

6:51 am on Oct 13, 2004 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Apr 15, 2004
posts:2047
votes: 0


NO

That just opens a new window from one you have open already.
(Reading the question may help here)

7:25 am on Oct 13, 2004 (gmt 0)

New User

10+ Year Member

joined:Oct 5, 2004
posts:27
votes: 0


Sure, the solution of Sanenet is to open a new window. What I want is the control of an opened window. They are different.