DelphiFAQ Home Search:
General :: Programming :: JavaScript
Code snippets to add functionality to your HTML pages, preferably cross-browser.


This list is sorted by recent document popularity (not total page views).
New documents will first appear at the bottom.

Featured Article

How to create a table that takes up the full screen


I want to display something centered on the screen and figured I use a table with one row and one column and set ALIGN=CENTER and VALIGN=CENTER. But how can I force the browser to full screen and adjust the table?


If your full screen window is popping up after a button or a link is clicked, then you can use javascript's as shown below.

If you need to resize an existing window, use the second piece of code. It will not hide the menu bar, status bar or other controls.

To make the table use the full window, simply put in WIDTH="100%" HEIGHT="100%" as shown at the bottom.

<script language="JavaScript" type="text/javascript">
 // this opens a url in fullscreen mode
function fullscreen() {
 var w ='','','fullscreen=yes');
 // make an existing window full screen (for Internet Explorer)
var w = screen.width;
 var h = screen.height;
 resizeTo(w, h);
 moveTo(0, 0);
 // end hiding contents -->
 <table WIDTH="100%" HEIGHT="100%"><tr>

Generated 20:02:18 on Oct 21, 2019