473,326 Members | 2,588 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

Window frame width and height property

I am not sure this is the right place to ask this question. I have a
web page composed with two frames (left and right). Then in my
frmae2(right one) , I open a pop-up window by javscript:
window.open(...). I hope the pop-up window has the same size of the
frame2, therefore I use the document.body.innerHeight and InnerWidth
(this is on IE 6), but My question is how can I get the left-top
position of the frame2 so that I can use the moveTo() to superimpose the
pop-up window over the frame2. It will make the popup looks like laid
top of frame2 at least from the openning of the main window. I can not
find anything about the frame.height and .width. Can anyone give me a
clue?

C Chang
Jul 23 '05 #1
2 4453
cschang wrote:
I am not sure this is the right place to ask this question.
Questions about the scripting of web pages are the main subject of this
group.
I have a web page composed with two frames (left
and right). Then in my frmae2(right one) , I open
a pop-up window by javscript: window.open(...).
Pop-up blocking means that maybe you don't open a new window for a
proportion of users.
I hope the pop-up window has the same size of the
frame2,
Hope?
therefore I use the document.body.innerHeight and InnerWidth
(this is on IE 6),
innerWidth/Height are not intended to report client area dimensions. On
IE clinetWidth/Height are more useful, though on IE 6 it may not be the
body that they should be read from (depending on the value of
document.compatMode).
but My question is how can I get the left-top
position of the frame2
Given a mouse event object, you can use the difference between clinteX/Y
and screenX/Y to calculate the screen co-ordinates of the top left
corner of the client area. However, there is no cross-browser method of
positioning a new window at those co-ordinates (even with browsers that
are capable/willing to open new windows).
so that I can use the moveTo() to superimpose
the pop-up window over the frame2.
Scripted control of window positioning is being increasingly restricted
due to abuse of the facility, so this is an optimistic desire.
It will make the popup looks like laid top of
frame2 at least from the openning of the main window.
As you have extremely restricted control over window chrome this seems a
value-less activity.
I can not find anything about the
frame.height and .width. Can anyone
give me a clue?


It strikes me that wanting to alter the user's display in an area
restricted to that of a frame in a browser, the sensible approach would
be to restrict activity to within that frame.

Richard.
Jul 23 '05 #2


cschang wrote:
I have a
web page composed with two frames (left and right). Then in my
frmae2(right one) , I open a pop-up window by javscript:
window.open(...). I hope the pop-up window has the same size of the
frame2, therefore I use the document.body.innerHeight and InnerWidth
(this is on IE 6), but My question is how can I get the left-top
position of the frame2


With IE you can use
window.screenLeft
window.screenTop
from inside the frame to find position relative to the screen.

--

Martin Honnen
http://JavaScript.FAQTs.com/
Jul 23 '05 #3

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

Similar topics

10
by: Scott | last post by:
I'm new to ASP, but I've been programming in VB for several years, and I'm having a few issues with this ASP enhancement I'm working on. I've found ASP to be a lot different than what I'm use to...
2
by: Randell D. | last post by:
HELP! Its taken me ages - I'm a newbie and I've compiled bits of code that I've read in this newsgroup over time to create one of my most intricate functions to date... Basically, the script...
9
by: Graham | last post by:
What I currently have is a page that opens another browser at 800x600, once that is loaded I would like to close the orginal page down while keeping the page that it has just opened open (To make...
14
by: Frances Del Rio | last post by:
if (parent.frames.main.location == 'mediaselect.html') { I have a very simple frameset, name of frame where I'm checking is 'main'... why is this not working? I mean this is correct syntax,...
1
by: stellabein | last post by:
Hi friends, I am very very new to programing. i have a one main window from that window i am opening one modal window using showmodaldialog(m.jp...). in that modal window i have a form. when i...
14
by: D. Alvarado | last post by:
Hello, I am trying to open a window containing an image and I would like the image to be flush against the window -- i.e. have no padding or border. Can I make this happen with a single call to a...
4
by: alexandre.brisebois | last post by:
Hi, I am using access 2003, I would like to know if there is an option to reorganize the tables in a maner that is readable, as we can do in sql sever 2000 or 2005. I have been given a database...
1
twitch3729
by: twitch3729 | last post by:
Basicaly, I have a frame with only a Canvas on it and a KeyListener. For some reason the keyListener stops registering my keys as soon as I have moved the Window from its starting position. I have...
0
by: Anish Chapagain | last post by:
Hi!! I'm trying to program an application which have multiple windows and is capable of executing method defined inside class of one another, i tries a simpel frame work here and am creating...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.