467,912 Members | 1,639 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 467,912 developers. It's quick & easy.

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
  • viewed: 4225
Share:
2 Replies
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 discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

10 posts views Thread by Scott | last post: by
2 posts views Thread by Randell D. | last post: by
9 posts views Thread by Graham | last post: by
14 posts views Thread by Frances Del Rio | last post: by
1 post views Thread by stellabein | last post: by
14 posts views Thread by D. Alvarado | last post: by
4 posts views Thread by alexandre.brisebois | last post: by
reply views Thread by Anish Chapagain | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.