<!-- RESOLUTION SAMPLER --> <!-- This goes in the HEAD of the HTML file --> <script language="JavaScript" type="text/javascript"> <!-- Copyright 2003, Sandeep Gangadharan --> <!-- For more free scripts go to http://www.sivamdesign.com/scripts/ --> <!-- function openFile() { if (document.opener.opt.selectedIndex == 0) { window.alert('You have not chosen a resolution from\nthe drop down menu!'); return false; } if (document.opener.opt.selectedIndex == 1) { theWidth = "640"; theHeight = "480"; } if (document.opener.opt.selectedIndex == 2) { theWidth = "800"; theHeight = "600"; } if (document.opener.opt.selectedIndex == 3) { theWidth = "1024"; theHeight = "768"; } if (document.opener.opt.selectedIndex == 4) { theWidth = "1152"; theHeight = "864"; } if (navigator.appName.indexOf("Netscape") != -1) { page = 'file:///' + document.opener.open.value; win = window.open(page,"NewWin","toolbar,menubar,location,status,scrollbars,resizable") win.resizeTo(theWidth, theHeight - 100); win.focus(); win.location.reload(); win.moveTo(0,0); } else { page = document.opener.open.value; win = window.open(page,"NewWin","toolbar,menubar,location,status,scrollbars,resizable") win.resizeTo(theWidth,theHeight); win.focus(); win.location.reload(); win.moveTo(0,0); } } function sizeIt() { window.resizeTo(710,240); window.moveTo(0,0); } window.onload = sizeIt; //--> </script> <!-- This goes in the BODY the html file --> <form name="opener"> <table border="0" cellpadding="4" cellspacing="0" height="50" bgcolor="#cccccc"> <tr> <td>&nbsp; <select name="opt"> <option value="0">Select Resolution...</option> <option value="1">640 x 480</option> <option value="2">800 x 600</option> <option value="3">1024 x 768</option> <option value="4">1152 x 864</option> </select> <input type="file" size="40" name="open" /> <input type="button" onClick="openFile()" value="Submit" />&nbsp; </td> </tr> </table> </form>