rich360
Programmer
- Nov 3, 2008
- 3
This will throw an error in IE7 but it works without errors in Mozilla Firefox, it also worked in IE6.
Any help would be greatly appreciated.
Thanks, Richard
Any help would be greatly appreciated.
Code:
Error: Line 3: 'windowToAdust.screen' is null or not an object.
Error2:Line 29: Object doesn't support this property or method.
<script type="text/javascript">
<!--
var windowToAdjust = ( window.external&&window.external.menuArguments ) ? window.external.menuArguments.parent : window;
function resizeWin(w,h){
if( typeof( w ) != 'number' ) {
w = parseInt( w ); h = parseInt( h );
if( isNaN( w ) || isNaN( h ) || w < 100 || h < 100 ) {
window.alert( 'Please input numerical values greater than 100 for both height and width and try again.' );
return;
}
}
windowToAdjust.moveTo(-4,-4);
windowToAdjust.resizeTo(
( w + 8 ) // when maximised, a window is 8px wider than the screen
-
( windowToAdjust.screen.width - windowToAdjust.screen.availWidth ) //allow for taskbar
-
( document.layers ? window.outerWidth - window.innerWidth : 0 ) //NS4 resizes the innerWidth, not outerWidth
,
( h + 8 ) // when maximised, a window is 8px taller than the screen
-
( windowToAdjust.screen.height - windowToAdjust.screen.availHeight ) //allow for taskbar
-
( document.layers ? window.outerHeight - window.innerHeight : 0 ) //NS4 resizes the innerHeight, not outerHeight
);
if( window.external && window.external.menuArguments ) { window.close(); }
}
function focusNorm() { if( window.document.forms[0]['N'+windowToAdjust.screen.width+'] ) { window.document.forms[0]['N'+windowToAdjust.screen.width+'].focus(); } }
function setZoom(oSelect) {
if( oSelect.selectedIndex ) {
if( windowToAdjust.document.body ) {
if( windowToAdjust.document.body.style ) {
if( parseInt( oSelect.options[oSelect.selectedIndex].value ) > 100 ) {
if( !window.confirm( 'All \'drop-down\' select inputs on the page you are adjusting will no longer operate correctly. Resize anyway?' ) ) { oSelect.options[0].selected = true; return; }
}
windowToAdjust.document.body.style.zoom = oSelect.options[oSelect.selectedIndex].value + '%';
if( window.external && window.external.menuArguments ) { window.close(); }
}
}
}
}
//--></script>
<script type="text/javascript">
function formReset()
{
document.getElementById("myForm").reset()
}
</script>
Thanks, Richard