473,770 Members | 4,419 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Hi, can this be done? [determining size of specified browser window]

Is there anyway to determine the present pixel height & width size of a
open browser window? :)

Nov 2 '06 #1
19 2134
ca******@gmail. com said the following on 11/1/2006 8:47 PM:
Is there anyway to determine the present pixel height & width size of a
open browser window? :)
Yes.

Your first Hint is that it is covered in the FAQ.
--
Randy
Chance Favors The Prepared Mind
comp.lang.javas cript FAQ - http://jibbering.com/faq
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Nov 2 '06 #2
and the second is check out randy's signature .....

Nov 2 '06 #3
Thank you for that. The only example that partially works (IE >6.0,
XP) is:

<script>

var winWidth = document.docume ntElement.clien tWidth
var winHeight = document.docume ntElement.clien tHeight
alert(winWidth)
alert(winHeight )

</script>

The winHeight comes back as 0.... the other examples show undefined....
is there something I am parsing wrong here? :)

Nov 2 '06 #4
ca******@gmail. com said the following on 11/2/2006 3:18 PM:
Thank you for that. The only example that partially works (IE >6.0,
XP) is:

<script>

var winWidth = document.docume ntElement.clien tWidth
var winHeight = document.docume ntElement.clien tHeight
alert(winWidth)
alert(winHeight )

</script>

The winHeight comes back as 0.... the other examples show undefined....
is there something I am parsing wrong here? :)
Yes.

--
Randy
Chance Favors The Prepared Mind
comp.lang.javas cript FAQ - http://jibbering.com/faq
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Nov 2 '06 #5
Can you please provide a working solution? Thank you!

Nov 2 '06 #6
Hmm, ok, then it appears your FAQ has unworking examples. What is the
working solution you don't mind sharing with the group? Thank you.
Best regards, Kat

Nov 2 '06 #7
ca******@gmail. com said the following on 11/2/2006 5:50 PM:
Hmm, ok, then it appears your FAQ has unworking examples.
It does? Where? The code in the FAQ does precisely what the FAQ says it
will do.
What is the working solution you don't mind sharing with the group?
"Working solution" to what?

--
Randy
Chance Favors The Prepared Mind
comp.lang.javas cript FAQ - http://jibbering.com/faq
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Nov 2 '06 #8

I'm very sorry Randy - If I take your words at face-value you are
saying in my earlier message that "Yes." I am parsing something
wrong?.... the code I presented in my prior message was a cut-and-paste
from your FAQ. I get the width demension but not the height, which
comes back as 0. The other examples don't work at all.... in Firefox
or IE 6.0 & 7.0. I might be overlooking something. When you say Yes,
can you articlate my misunderstandin g? :)

Nov 3 '06 #9
TC

ca******@gmail. com wrote:
I'm very sorry Randy -
He's not interested in helping you. Perhaps you did not genefluct
correctly.

Try here:
http://msdn.microsoft.com/library/de.../measuring.asp

Remember the 'type' attribute in your <scriptelements :
<script type="text/javascript">

HTH,
TC (MVP MSAccess)
http://tc2.atspace.com

Nov 3 '06 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
4231
by: Johnny Knoxville | last post by:
I've added a favicon to my site (http://lazyape.filetap.com/) which works fine if you add the site to favourites the normal way, but I have some JavaScript code on a couple of pages with a link, which when you click it bookmarks the site (much easier). The favicon is never saved if the site is bookmarked this way. Does anyone have any ideas how to fix this?? This is the code: <script language="JavaScript">
2
2823
by: Jan Roland Eriksson | last post by:
Archive-name: www/stylesheets/authoring-faq Posting-Frequency: twice a week (Mondays and Thursdays) Last-modified: August 28, 2002 Version: 1.15 URL: http://css.nu/faq/ciwas-aFAQ.html Maintainer: Jan Roland Eriksson <rex@css.nu> ciwas stylesheet authoring FAQ v1.15 ______________________________________________________________________
0
1960
by: Jan Roland Eriksson | last post by:
Archive-name: www/stylesheets/authoring-faq Posting-Frequency: twice a week (Mondays and Thursdays) Last-modified: April 10, 2003 Version: 1.16 URL: http://css.nu/faq/ciwas-aFAQ.html Maintainer: Jan Roland Eriksson <rex@css.nu> ciwas stylesheet authoring FAQ v1.16 ______________________________________________________________________
3
4177
by: w2000 | last post by:
Greeting all, I am studying Javascript to custom my yahoo estore, I need to open a custom sized window in a new browser , I tried the following script on 3 different PCs running XP pro. IE 6, it worked on one and did not work on the other two. Please need your help. Thanks Luka
1
2543
by: Doug | last post by:
When opening a DOC file via a hyperlink, is it possible to force Microsoft Word to open in a specified-size window? For example, a 600x300 window? I realize that MS Word will 'remember' the window size and placement from the last instance that was created/exited. Help is appreciated. Thanks.
6
4901
by: scottyman | last post by:
I can't make this script work properly. I've gone as far as I can with it and the rest is out of my ability. I can do some html editing but I'm lost in the Java world. The script at the bottom of the html page controls the form fields that are required. It doesn't function like it's supposed to and I can leave all the fields blank and it still submits the form. Also I can't get it to transfer the file in the upload section. The file name...
7
2183
by: Tim Rogers | last post by:
Hi folks, this is a resolution-detect script that I used on a site. As you can see it is designed to detect when the screen resolution falls below a certain level then load an alternative style sheet HOWEVER, is it possible to make a change to the code that will not only make it respond to windows with widths of less than 800 pixels but ALSO heights of less than 600 pixels. I'm a complete novice when it comes to .js so and help would...
3
4887
by: Steve Sobol | last post by:
I need to use JavaScript and the DOM to determine the available amount of browser space - the total size of the browser window minus whatever space is used by chrome. window.innerHeight and window.innerWidth seem to work fine in Opera 8 and Firefox 1.5. In IE, I've read that you need to use document.body.clientHeight and .clientWidth but that seems to only give you the dimensions of the box created by your <body> tag. Whatever...
4
3875
by: Ty | last post by:
Hello all, I am creating a web site with Visual Stuido 2008. I am trying to use a java script file to create a busybox for login from this page http://blogs.crsw.com/mark/articles/642.aspx. I am using a master page senerio. The erro I'm getting is 'busyBox' is not a member of 'ASP.login2_aspx'
0
9602
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10071
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10017
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9882
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7431
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6690
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5326
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5467
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3589
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.