/    Sign up×
Community /Pin to ProfileBookmark

resizing CURRENT browser window (not NEW ones!)

Hello,

I’m familiar with opening a new window and removing it’s titlebars, toolbars and everything and getting it fullscreen.

However for a website I’m making I need to have a page that automatically does this when the page is LOADED. (I know this is incredibly annoying for someone who’s visiting the page, but it’s what the client wants… and no, he doesn’t want a new window to pop-up, he wants the first thing that happens when you browse to his page, to be it immediately going fullscreen without the browser bars so the viewer ‘can focus on the content’).

I’ve no clue how to do this, the best I can do is maximize the screen but this still leaves the browser toolbars.

Anyone can be of help ? I’d appreciate it. ?

to post a comment
JavaScript

2 Comments(s)

Copy linkTweet thisAlerts:
@BillyRayAug 06.2004 — You cannot remove these once the window has loaded. Your best bet is to have some instructional text on the screen telling the user to "Press F11" to get more space.

Dan
Copy linkTweet thisAlerts:
@JacksonCochraneAug 06.2004 — You might give the following a try, as a viable workaround.

<HTML>

<Head>

<Script Language=JavaScript>


function replaceThis(){

wStr = screen.availWidth-10;
hStr = screen.availHeight-10;
wStr = "width="+wStr;
hStr = "height="+hStr;
cleanWindow = window.open("theContent.html","isContent","toolbar=0,status=0,"+wStr+" "+hStr+",top=0,left=0");
window.opener = "";
window.close();
}

window.onload=replaceThis


</Script>

</Head>

<Body>

</Body>

</HTML>
×

Success!

Help @igorski spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.17,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @nearjob,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,
)...