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

Trying to retrieve pageOffSet

Hi,

I'm trying to get the x and y cords for a window using "pageXOffSet" and
"pageYOffSet" but all it returns is "undefined". Is this old syntax? How
do I do this?
Thanks,
Billy
Jul 20 '05 #1
2 2956
> I'm trying to get the x and y cords for a window using "pageXOffSet" and
"pageYOffSet" but all it returns is "undefined". Is this old syntax? How
do I do this?


Maybe I should add that I'm trying to retrieve the position of the window
(where it has been scrolled to).

Billy
Jul 20 '05 #2
DU
Billy wrote:
Hi,

I'm trying to get the x and y cords for a window using "pageXOffSet" and
"pageYOffSet" but all it returns is "undefined".
That's one good example of relying on detection of method/property
support instead of user agent string detection.

Is this old syntax? How do I do this?
Thanks,
Billy


These are supported by Mozilla-based browsers, Safari 1.x and Opera 7.x;
they are not supported by MSIE 5+.

You must use
document.documentElement.scrollLeft and document.documentElement.scrollTop
for MSIE 6 in standards compliant rendering mode.
You must use
document.body.scrollLeft and document.body.scrollTop
for MSIE 6 in backward compatible rendering mode and for MSIE 5.

DU
Jul 20 '05 #3

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

Similar topics

6
by: James Turner | last post by:
I am trying to store formatted text (windows format) into a MySQL database and then retrieve it. The field in the database is a varchar. I cut and paste the test into a form field formatted, then...
11
by: Samantha | last post by:
I am attempting to extract the Font Names from the installed windows fonts. I am having a heck of a time getting these rather than the file names. Examples can be seen by going to Control Panel >...
2
by: Ed_P. | last post by:
Hello, I am trying to retrieve the list of users that belong to a security group Active Directory. But I am unable to retrieve the users. Below you will find the code that I am using, please...
12
by: Phil Certain | last post by:
Hi, I'm trying to do something very simple...or at least it should be. I have created a host page (gen.aspx) and a very simple user control (us.ascx). The corresponding code-behind files are...
2
by: Andrew | last post by:
I hope this doesn't sound too silly. I am trying to cache a datatSet. I have written the code below. I insert into the cache: Eg. i = 1. if (Cache == null) { Cache.Insert("testQuestion"+ i,...
4
by: freefly_xml | last post by:
I want to test to see if I am on the last page of a document. In this example it is an invoice. I want to print a different table in REGION AFTER when I am on the last page. I have tried many...
9
by: Jeremy | last post by:
I have a situation where i am trying to run two query's and retrieve one record from each query, then using Union combine them into one recordset. The First Query is strait forward and should just...
6
by: AppleBag | last post by:
I'm having the worst time trying to login to myspace through code. Can someone tell me how to do this? Please try it yourself before replying, only because I have asked this a couple of times in...
4
chumlyumly
by: chumlyumly | last post by:
Hi - I'm working with PHP5 MySQL Mac OSX I've developed two pages where a user can input his/her info, which goes to a MySQL database. The first page is supposed to pass the newly created...
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
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
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,...
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.