473,405 Members | 2,185 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,405 software developers and data experts.

Get IFRAME xy coordinate in Mozilla

I want iframe xy coordinate using mozilla, when i execute my code into IE, it returning me proper x & y coordinate but in mozilla it returns me zero of X & Y.

Thanks in Advance
Amit Mittal
Jun 11 '07 #1
3 4456
dmjpro
2,476 2GB
I want iframe xy coordinate using mozilla, when i execute my code into IE, it returning me proper x & y coordinate but in mozilla it returns me zero of X & Y.

Thanks in Advance
Amit Mittal
Welcome to TSDN.

What is ur code run in IE.
Plz show us.

Kind regards,
Dmjpro.
Jun 11 '07 #2
There are two functions that returns me Left & Top coordinate of iframe in IE, But not in any ohter Browser...

function findPosCurleft(obj)
{
var curleft=0;
//alert('obj' + obj);
if(obj!=null)
{
if(obj.offsetParent)
{
//alert('obj.offsetParent' + obj.offsetParent);
curleft=obj.offsetLeft;
//alert('curleft' + curleft);
while(obj=obj.offsetParent)
{
curleft+=obj.offsetLeft;
//alert('curleft + ' + curleft);
}
}
}
//alert('return curleft ' + curleft);
return curleft;
}
function findPosCurtop(obj)
{
var curtop=0;
if(obj!=null)
{
if(obj.offsetParent)
{
curtop=obj.offsetTop;
while(obj=obj.offsetParent)
{
curtop+=obj.offsetTop;
}
}
}
//alert('return curtop ' + curtop);
return curtop;
}
Jun 19 '07 #3
acoder
16,027 Expert Mod 8TB
Have you seen this page? I assume you ave looking at your code. Does it work with other elements?
Jun 19 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Jeff Thies | last post by:
I'm (still) having trouble reading the contents of an IFRAME (IE5). I have this: var my_iframe = document.frames; What I would want to do at that point is get either the...
3
by: alejandro.rivero | last post by:
In Mozilla, the following code seems to resize correctly the IFRAME, so no scroll bars: <iframe marginwidth=0 marginheight=0 src=text.html onload="this.height= this.contentDocument.height">...
2
by: swathi | last post by:
----------------------------------------------------------------------- A poll associated with this post was created, to vote and see th results, please visit...
6
by: Randell D. | last post by:
Folks, I've spent the past hour or so testing IFRAME with Mozilla 1.7.5 and not getting it to work - Then... I thought I'd try it in IE, and my code worked... Thus... is IFRAME an IE only...
16
by: Mcginkel | last post by:
I am trying to find a way to load XHTML content in an Iframe. I use to do this in html by using the following code : var iframeObject = document.createElement("iframe");...
1
by: christine.nguyen | last post by:
I'm using offset values to find the x,y position of an iframe on an html page. The code works in all browsers except in Mac explorer 5.x. Does anybody have any ideas how to get around this?? ...
14
by: Aaron Gray | last post by:
Hi, I want to access the properties of an IFrame but seem unable to get access to the IFrames document body. <html> <body> <iframe src="test.html" id="IFrame"></iframe> </body>
3
by: bulldog8 | last post by:
I am having problems with changing a frames source file for Mozilla (1.5.0.4). The followig code works for IE: <script type="text/javascript"> var imgP = new Image(); function...
3
by: tullyrob | last post by:
If you run the following simple line of code in Mozilla the webpage loads fine. However, a default page is displayed when opened in IE. --- <html> <iframe name=stbbox...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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...
0
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
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...

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.