#1
  1. No Profile Picture
    Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2001
    Location
    Zimbabwe
    Posts
    14
    Rep Power
    0
    hi everyone,

    i'm trying to open up a new window which has no toolbars -- (i want to disable browser buttons for big updates etc...) --
    at the moment i'm using a javascript function to get the screen size (resolution) of the current window.
    i'm using the height and width extracted as variables for the resizing of the new "toolbarless" window.
    i want the new window to fill the whole screen.

    Then there is another function "spawnwindow" which sets everything.
    And then the h-ref which calls the "spawnwindow" function to open the new window.

    Code:
    
    <HTML>
    <HEAD>
    
    <script>
    function getres() { 
    	var swidth,sheight; 
    	if(document.all) { 
    		swidth=document.body.offsetWidth 
    		sheight=document.body.offsetHeight 
    	} else if(document.layers) { 
    		swidth=window.innerWidth 
    		sheight=window.innerHeight 
    	} 
    	alert("Screen Resolution :" +swidth+" * "+ sheight); 
    } 
    
    function spawnwindow(name,w,h,x,y) {
    	var strOpt="height="+h+",width="+w+",menubar=no,personalbar=no,resizable=yes,scrollbars=yes,status=no,toolbar=no,left="+x+",top="+y+"";
    	closeup = window.open("JOBFRAMES.php","whatever",strOpt);
    	close();
    	closeup.focus();
    }
    </SCRIPT>
    </head>
    <body onLoad="getres()">
    
    
    other HTML stuff...
    
    <a href="Javascript" ONCLICK="spawnwindow('logpass',swidth,sheight);">Continue</a>
    
    other HTML stuff...
    
    </BODY>
    </HTML>


    The "getres" function returns the size of the body and i want it to give the size of the entire window instead.
    And - well - i don't actually know what the hell is going on.....javascript ain't my forte.

    any help (or alternate suggestions) much appreciated!!
  2. #2
  3. Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2000
    Location
    Salt Lake City
    Posts
    36
    Rep Power
    14
    Hi,
    Why don't you try using "screen.width" & "screen.height" ???/
    That might help.
    Regards.
    Arijit

IMN logo majestic logo threadwatch logo seochat tools logo