#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 know it's not php.... but maybe it can be done using php.

    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 the vars aren't working the way i've done them.
    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. .Net Developer
    Devshed Novice (500 - 999 posts)

    Join Date
    Feb 2000
    Location
    London
    Posts
    987
    Rep Power
    15

    <<
    i know it's not php.... but maybe it can be done using php
    >>


    You need to do this with JavaScript.You can't do with this Php .

    You may need to post this question on JavaScript forum.
    SR -
    webshiju.com
    www.lizratechnologies.com

    "The fear of the LORD is the beginning of knowledge..."
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Jan 2001
    Location
    UK
    Posts
    527
    Rep Power
    14
    Have you tried

    screen.width and screen.height

    or

    screen.availWidth and screen.availHeight

    in JavaScript
  6. #4
  7. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2001
    Posts
    6
    Rep Power
    0
    here is how to do it

    if (document.all) {
    sW = screen.availWidth;
    sH = screen.availHeight;
    } else {
    sH = screen.Height;
    sW = screen.Width;
    }

IMN logo majestic logo spyfu logo threadwatch logo seochat tools logo