472,328 Members | 1,107 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,328 software developers and data experts.

retain scroll postion after reload page.

Hi group,

I want to back orginal scroll postion after reload page. Is it
possible?
My situation is
call popup windows -enter data on popup -close popup -refresh
parent page -reload data.
As you know, scroll position will be 0,0 after reloading page. But I
want to go the postion where user click the link for popup windows.
Thanks,

Sungung
Mar 14 '08 #1
3 6263
Hi sungung,
you can reload the page maybe with an anchor(location.hash) like #/
page/xcoord/ycoord and
retreive it after reloading like:

[site] =[popup] =>[popup](close and let it refresh window.top but
with a additional location.hash) =[site](checks for a location.hash
like #/page/xcoord/ycoord and if is set goes to the coords)

Mar 14 '08 #2
sungung wrote:
I want to back orginal scroll postion after reload page. Is it
possible?
My situation is
call popup windows -enter data on popup -close popup -refresh
parent page -reload data.
As you know, scroll position will be 0,0 after reloading page. But I
want to go the postion where user click the link for popup windows.
I would save it in a session cookie.
Mar 14 '08 #3
SAM
sungung a écrit :
Hi group,

I want to back orginal scroll postion after reload page. Is it
possible?
My situation is
call popup windows -enter data on popup -close popup -refresh
parent page -reload data.
As you know, scroll position will be 0,0 after reloading page. But I
want to go the postion where user click the link for popup windows.

file in main window :

(JS in head)
window.onload = function() {
myAnchor = self.location.search;
if( myAnchor.indexOf('?')>=0 &&
myAnchor != '?') self.location = myAnchor.replace('?','#');
}

(body somewhere)
<a id="P_12" onclick="return popup('page.php'+'?'+this.id);">blah</a>
file in popup window :

<a href="#"
onclick=" var myAnchor = self.location.search;
opener.location = opener.location+myAnchor;
self.close();"close </a>

--
sm
Mar 14 '08 #4

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

Similar topics

5
by: Daniel | last post by:
Hi All, i have problem to scroll the page the the specific section of the page after click a command button. I have tried using <a name="f"> and...
6
by: | last post by:
Hi all, I have a long web form on asp.net 2.0. When I go at the bottom and click on submit, a postback occurs and if there are any validation...
3
by: parm | last post by:
How do I preserve scroll position of a parent page when displaying a popup modal page. I have a page with a data grid on it (datagrid itself has no...
4
by: Woody Splawn | last post by:
I have a winform where I would like to explicitelty set the Horizontal scroll postion for a panel. I would have guessed something like the...
7
by: James | last post by:
Hi, I have a Windows Forms application which uses multiple child forms (MDI interface). The height of one of the child forms is larger than...
1
by: lg | last post by:
Is there a way to set/get vertical scroll postion without Javascript. At times I need to repaint the page but the page should scroll to certain...
1
by: srinivasyadavkota | last post by:
Hello experts here, plz help me, When I Scroll down my web page using vertical scroll bar to some point and when refreshed, I was unable to...
2
by: Brent | last post by:
I have a child page opened with a simple open() statement. I'd like to be able to refresh the parent page and keep the current scroll position. (If...
5
by: raamay | last post by:
i have a form via which new users can register their information along with their Resume. Now when input validation is done, if there is some errors,...
0
by: tammygombez | last post by:
Hey fellow JavaFX developers, I'm currently working on a project that involves using a ComboBox in JavaFX, and I've run into a bit of an issue....
0
by: teenabhardwaj | last post by:
How would one discover a valid source for learning news, comfort, and help for engineering designs? Covering through piles of books takes a lot of...
0
by: Kemmylinns12 | last post by:
Blockchain technology has emerged as a transformative force in the business world, offering unprecedented opportunities for innovation and...
0
by: CD Tom | last post by:
This only shows up in access runtime. When a user select a report from my report menu when they close the report they get a menu I've called Add-ins...
0
by: Naresh1 | last post by:
What is WebLogic Admin Training? WebLogic Admin Training is a specialized program designed to equip individuals with the skills and knowledge...
0
jalbright99669
by: jalbright99669 | last post by:
Am having a bit of a time with URL Rewrite. I need to incorporate http to https redirect with a reverse proxy. I have the URL Rewrite rules made...
0
by: antdb | last post by:
Ⅰ. Advantage of AntDB: hyper-convergence + streaming processing engine In the overall architecture, a new "hyper-convergence" concept was...
1
by: Matthew3360 | last post by:
Hi, I have a python app that i want to be able to get variables from a php page on my webserver. My python app is on my computer. How would I make it...
0
by: AndyPSV | last post by:
HOW CAN I CREATE AN AI with an .executable file that would suck all files in the folder and on my computerHOW CAN I CREATE AN AI with an .executable...

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.