473,756 Members | 1,770 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 6390
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.s earch;
if( myAnchor.indexO f('?')>=0 &&
myAnchor != '?') self.location = myAnchor.replac e('?','#');
}

(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.s earch;
opener.location = opener.location +myAnchor;
self.close();"c lose </a>

--
sm
Mar 14 '08 #4

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

Similar topics

5
2993
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 use response.redirect("xxxx.aspx?#f"). Although it works but i dont wan to reload the page. I also used hyperlink to goto the "f" section. It works good without fire an event (which cause reload page) but, the problem, i wan to click on a command button and not the hyperlink.
6
2340
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 errors (no client-side checking being done), the page loads again, but this time the scroll position is at the bottom. This is annoying, because the actual validation error messages are on the top and the user cannot see them. Any ideas? I have turned off maintainscrollbackpositiononpostback in the...
3
2026
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 scrollbars, only the datagrid page has scrollbars), when I click on the grid row to display the details on a modal popup page the parent page (with datagrid on it) scrolls to the top before the popup page is displayed. I want the page to hold its current postion (it should show the row that I...
4
16467
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 following would work but it does not Contracts2_Fill_Panel.AutoScrollPosition.X = someNumber Could someone give me the proper syntax?
7
11515
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 the height of the MDI client area, so when this form is visible, the vertical scroll bar of the MDI parent appears automatically. What I want to do is write a routine within the MouseWheel event of the MDI
1
2214
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 postion depending on user input.
1
2105
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 retain back the scrolled position, instead it always goes to the top part of the page. How can I retain this scrolled position even after refreshing the page ? a piece of code helps. Thanks and Regards, SrinivasKota.
2
5010
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 I do an "F5" refresh on IE, for instance, the page will return to the last position it had.) Is there any "easy" way to accomplish this? I've been using window.opener.location.reload();
5
3586
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, then the page is reloaded with the users information retained for necessary correction. In this process i find the file name and local path missing every time. So, how should we retain the local file path during page reload.
0
9456
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9275
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9872
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8713
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7248
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6534
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5304
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3805
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2666
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.