[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now


Use javaScript to make an existing window full screen?

Posted on 2004-10-31
Medium Priority
Last Modified: 2011-02-10
I want to toggle a normal browser window between normal and full screen by cliking a button on the page within the window.  Is it possible to take a browser window that was opened normally and make it full screen?
Question by:soBC
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
LVL 21

Expert Comment

ID: 12457180
<script language="JavaScript">
window.open ("http://yahoo.com", "","fullscreen=yes")

Expert Comment

ID: 12457199
Paste this code to the HEAD of your html document.

function fullwin(){

<input type="button" onClick="fullwin()" value="Open Full Screen Window">

where http://www.yahoo.com is the address you need ot change it could be contact.html or http://www.yourdomain.com/contact.html (if the page you are re-directing to is already uploaded on the serveR)

P.S:- Trying using Microsoft Frontpage if you could.
Simplify Your Workload with One Tool

How do you combat today’s intelligent hacker while managing multiple domains and platforms? By simplifying your workload with one tool. With Lunarpages hosting through Plesk Onyx, you can:

Automate SSL generation and installation with two clicks
Experience total server control


Author Comment

ID: 12457330
Thanks for the responses, but the window I need to toggle is existing.  I dont want to open a new window in full screen mode...I want to take an existing window that is not in full screen mode and change it to full screen by clicking a button and invoking some JavaSciprt/dHTML/etc...
LVL 18

Assisted Solution

tusharashah earned 400 total points
ID: 12457348
On the OnClick event of your button add following JavaScript to make your window Full Screen:

function btnOnClick()


Expert Comment

ID: 12457353
sorry, i didn't get ya.
LVL 36

Accepted Solution

Zyloch earned 400 total points
ID: 12457725
Like the others said, it's pretty impossible to make current window fullscreen.

You can use tusharashah's method, although the title bar, etc., unless you make the moveTo a negative amount and the browser width, height, a greater amount than the screen, for instance,

If the title bar is 50px (I'm not sure what it is, you'd use):
and the status bar is also 50px (again, not sure what it is):


The -50 hides the title bar and the positive 100 should theoretically hide the status bar and the title bar.

Another method would be to close the current window and open a new one. Again, this may not be most desirable, for instance, if there are POST variables, it could get a bit messy with hidden forms and such, but the general concept is follows:

function btnOnClick() {
   if (window.location.href.indexOf("fullscreen=yes")==-1) {
   } else {

Assisted Solution

PodExpert earned 400 total points
ID: 12458061
However, after installing Windows XP Service Pack 2, you will not be able to create a window greater than the screen, there are also some additional restrictions (applies only to Internet Explorer, of course). Using Zylochs method is therefor not recommended, because it will not work on updated systems with IE.

Featured Post

Will your db performance match your db growth?

In Percona’s white paper “Performance at Scale: Keeping Your Database on Its Toes,” we take a high-level approach to what you need to think about when planning for database scalability.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Although a lot of people devote their energy toward marketing for specific industries, there are some basic principles that can be applied to any sector imaginable. We’ll look at four steps to take and examine how those steps were put into action fo…
Australian government abolished Visa 457 earlier this April and this article describes how this decision might affect Australian IT scene and IT experts.
Viewers will get an overview of the benefits and risks of using Bitcoin to accept payments. What Bitcoin is: Legality: Risks: Benefits: Which businesses are best suited?: Other things you should know: How to get started:
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
Suggested Courses

649 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