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