JavaScript Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsWeb DesignJavaScript Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old April 12th, 2001, 07:55 AM
mikemm mikemm is offline
Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2001
Location: Zimbabwe
Posts: 14 mikemm User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation 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!!

Reply With Quote
  #2  
Old April 12th, 2001, 09:21 AM
Shiju Rajan's Avatar
Shiju Rajan Shiju Rajan is offline
.Net Developer
Dev Shed Novice (500 - 999 posts)
 
Join Date: Feb 2000
Location: London
Posts: 987 Shiju Rajan User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 h 26 m 22 sec
Reputation Power: 14
Send a message via MSN to Shiju Rajan Send a message via Yahoo to Shiju Rajan

<<
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..."

Reply With Quote
  #3  
Old April 12th, 2001, 05:09 PM
JohnB JohnB is offline
Contributing User
Dev Shed Novice (500 - 999 posts)
 
Join Date: Jan 2001
Location: UK
Posts: 527 JohnB User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 13
Have you tried

screen.width and screen.height

or

screen.availWidth and screen.availHeight

in JavaScript

Reply With Quote
  #4  
Old April 12th, 2001, 11:59 PM
aleczapka aleczapka is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2001
Posts: 6 aleczapka User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via AIM to aleczapka
here is how to do it

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

Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb DesignJavaScript Development > I need help with javascript, anyone, Please!

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap