[thelist] Nav JS window problem

Erik Mattheis gozz at gozz.com
Tue Sep 12 09:57:35 CDT 2000


The following function misbehaves in Nav 4.7 Mac, and I don't see why ...

If the window bigButt already exists, calling the function resizes 
and focuses the window but does not load the new location into it, 
however if it is called a second time, the new location does load.

What am I not seeing? Originally, I had an if (!bigButt || 
bigButt.closed) conditional in it and did things a little 
differently, which worked fine in Nav, however IE Mac would give an 
error when bigButt.closed=true.

var theVer=navigator.appVersion.charAt(0);

function Moon_Me(theFile,theWidth,theHeight){
         if (navigator.appName == 'Netscape'){
                 winWidth=theWidth;
                 winHeight=theHeight;
                 }
         else {
                 winWidth=theWidth;
                 winHeight=theHeight+16;
                 }
         bigButt=window.open('butts/'+theFile,'bigButt','width=' + 
winWidth + ',height=' + winHeight + 
',screenX=0,screenY=0,left=0,top=0,status,resizable,scrollbars=0');
         if (theVer>=4){
                 bigButt.resizeTo(theWidth,theHeight);
                 }
         if (theVer>=4 || (theVer==3 && navigator.appName=='Netscape')){
                 bigButt.focus();
                 }
         }

This is at http://smellmybutt.com/frameset_gallery.html (NOTE: site 
could be offensive to you or your boss)
-- 

___________________
- Erik Mattheis
http://gozz.com/

(612) 827 3963






More information about the thelist mailing list