473,480 Members | 2,123 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Find the Top Left xy of an <IFRAME>

I have an IFrame:

<IFRAME id="BIssues" title="issues" src="BIssues.aspx"
frameBorder="no"style="position:absolute;width:100 %;height:
150px;border:0px">

In this iframe I have onmouseover that opens a floating text. The
issue that comes into play is that the mouse position is relative to
the iframe and displays the floating text using the same coordinates
except on the parent window. Is there a way I can find the top and
left coordinates of the iframe so I can add them to the coordinates
when I display the floating text? The java script is contained in the
IFrame.

I tried the following and the browser does not like this:

x=x+parent.document.getElementById('BIssues').styl e.left;
y=x+parent.document.getElementById('BIssues').styl e.top;

Any help is greatly appreciated.

~Brad

Mar 15 '06 #1
1 3045
mi******@gmail.com wrote:
Is there a way I can find the top and
left coordinates of the iframe


A number of cases must be considered to get accurate results.

Using the lib at http://www.javascripttoolbox.com/lib/objectposition/ will
do it all for you.

--
Matt Kruse
http://www.JavascriptToolbox.com
http://www.AjaxToolbox.com
Mar 15 '06 #2

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

Similar topics

1
3740
by: O.J. Tibi | last post by:
hi guys, i was wondering if you could help me with a small problem. i need to have an <iframe> to behave like a <div>, in such a manner that: 1) the <iframe> should have its own display space,...
44
919
by: Jim M | last post by:
I have had great success with using <iframe> with overflow-y set to auto. I can get a similar look with the <iframe> tag. BUT... In all cases I need to have fixed heights. Is there a way to...
9
3116
by: Julia Briggs | last post by:
How do I construct a <iframe> or equivalent for FireFox/NS browsers, inside a screen centered <div> tag? Can it be done?
2
2032
by: chaitatp | last post by:
Hi guys, I have posted a similar question before but this post has some different. The similar link is: ...
5
2246
by: Grzesiek | last post by:
Hi! I have created page which contains some menu buttons and <iframe> with sub-page. Each menu action on the master web site should change content of iframe (by changing src attribute). But how to...
1
6155
by: tilt | last post by:
Hello, I use an object element to replace the iframe element in ie, like this: <object id="x_obj" data="http://.../" type="text/html"> <iframe name="x_if" id="x_if"...
1
2676
by: vHTML | last post by:
hello everyone :) I am trying to make a page which would take a "entered" on search query from the previous page and display results in google with that query in an <iframe> in the results.htm...
0
1981
by: diver | last post by:
I was using an <iframe> to load a website within my .aspx page. When the user "logged out", I called a javascript break out function to breakout of the frame and load the appropriate page when...
0
7050
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7091
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...
1
6743
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...
0
6966
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...
0
5344
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
4787
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...
0
4488
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...
0
2988
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
564
muto222
php
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.