472,782 Members | 1,191 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,782 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 4425
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...
3
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 2 August 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
by: erikbower65 | last post by:
Using CodiumAI's pr-agent is simple and powerful. Follow these steps: 1. Install CodiumAI CLI: Ensure Node.js is installed, then run 'npm install -g codiumai' in the terminal. 2. Connect to...
0
by: kcodez | last post by:
As a H5 game development enthusiast, I recently wrote a very interesting little game - Toy Claw ((http://claw.kjeek.com/))。Here I will summarize and share the development experience here, and hope it...
0
by: Taofi | last post by:
I try to insert a new record but the error message says the number of query names and destination fields are not the same This are my field names ID, Budgeted, Actual, Status and Differences ...
14
DJRhino1175
by: DJRhino1175 | last post by:
When I run this code I get an error, its Run-time error# 424 Object required...This is my first attempt at doing something like this. I test the entire code and it worked until I added this - If...
0
by: Rina0 | last post by:
I am looking for a Python code to find the longest common subsequence of two strings. I found this blog post that describes the length of longest common subsequence problem and provides a solution in...
5
by: DJRhino | last post by:
Private Sub CboDrawingID_BeforeUpdate(Cancel As Integer) If = 310029923 Or 310030138 Or 310030152 Or 310030346 Or 310030348 Or _ 310030356 Or 310030359 Or 310030362 Or...
0
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
2
by: DJRhino | last post by:
Was curious if anyone else was having this same issue or not.... I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...

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.