473,327 Members | 1,976 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,327 software developers and data experts.

Capturing and setting window "pageYOffset"

Don

- I'm trying to have the "header" frame capture the "main" frame's "pageYOffset"
- Then, after some processing the "header" frame has to reload the same "main" frame page, but I
want it returned to the same vertical scroll position.
- The"main" frame page then picks up the captured "pageYOffset" stored in the "header" frame and
restores it before the "main" frame page is written to the display. What am I doing wrong with this
code? Can't seem to get it to work.

"header" frame:
..
..
..
var mainPageYOffset;
//
mainPageYOffset = parent.main.window.pageYOffset.value;
//
parent.main.location="mainPage";
"main" frame & same reloaded "mainPage":
..
..
..
window.pageYOffset.value = parent.header.mainPageYOffset;
Thanks for your help.
Don

----== Posted via Newsfeeds.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeeds.com The #1 Newsgroup Service in the World! 120,000+ Newsgroups
----= East and West-Coast Server Farms - Total Privacy via Encryption =----
Jul 23 '05 #1
1 4840
Don
On Sun, 13 Mar 2005 22:11:01 -0700, Don <no@adr.com> wrote:

- I'm trying to have the "header" frame capture the "main" frame's "pageYOffset"
- Then, after some processing the "header" frame has to reload the same "main" frame page, but I
want it returned to the same vertical scroll position.
- The"main" frame page then picks up the captured "pageYOffset" stored in the "header" frame and
restores it before the "main" frame page is written to the display. What am I doing wrong with this
code? Can't seem to get it to work.

"header" frame:
.
.
.
var mainPageYOffset;
//
mainPageYOffset = parent.main.window.pageYOffset.value;
//
parent.main.location="mainPage";
"main" frame & same reloaded "mainPage":
.
.
.
window.pageYOffset.value = parent.header.mainPageYOffset;
Thanks for your help.
Don

----== Posted via Newsfeeds.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeeds.com The #1 Newsgroup Service in the World! 120,000+ Newsgroups
----= East and West-Coast Server Farms - Total Privacy via Encryption =----

I wonder if I should be using "scrollY" instead? I sure could use some help on this one.

Thanks,
Don

----== Posted via Newsfeeds.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeeds.com The #1 Newsgroup Service in the World! 120,000+ Newsgroups
----= East and West-Coast Server Farms - Total Privacy via Encryption =----
Jul 23 '05 #2

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

Similar topics

4
by: KathyB | last post by:
I have the following script in an html page: function goToPosition() { varGoTo = document.write(document.cookie("Position")); document.scrollTo(0, varGoTo); } </head> <body...
5
by: Kai Grossjohann | last post by:
On unload of a page, I store the current scrollbar position (ie, window.pageXOffset and window.pageYOffset) into a cookie. On load of that same page, I fetch the information from that cookie and...
13
by: Simon Wigzell | last post by:
Can I trap when the scroll is ended? This is what I want - the calculator disapears when the site visitor starts scrolling the main page. I'm doing that with an "onScroll()" function. I'm bringing...
1
by: Stuart | last post by:
The following code works well in IE5 and Netscape 7, apparently my page is not working in Netscape 4.6 and it has been suggested that i need a third option dwellig around the document.layers...
1
by: Wiseman | last post by:
Hello, I am making a web page and have included a JavaScript named crazy clock. The page displays fine in IE but not in Firefox. The event console says: "event is not defined" at line 143....
8
mikek12004
by: mikek12004 | last post by:
1) Script Title: Rich HTML Balloon Tooltip 2) Script URL :http://www.dynamicdrive.com/dynamicindex5/balloontooltip.htm 3) Problem Description: See this page General Music for links you can...
5
matheussousuke
by: matheussousuke | last post by:
Hello, I'm using tiny MCE plugin on my oscommerce and it is inserting my website URL when I use insert image function in the emails. The goal is: Make it send the email with the URL...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.