kvarnerexpress 0 Report post Posted May 4, 2005 Does anyone know if there is a javacript command to bring the browser to the same part of a long page after a refresh called by a pop up (populating a db).I have tried various methods including refresh() and reload() as well as redirecting back to the original page in the opener window.Does this functionality exist ?? please help... Share this post Link to post Share on other sites
SystemWisdom 0 Report post Posted May 4, 2005 What you are looking for is possible, but it is not JavaScript.. Rather, it is part of the HTML standard. Just use simple anchor tags (<a>) but instead of using the href attribute, you use the name attribute. That creates an anchor to a page spot (like half way down a long page).. then, when you want to link to that page AT the anchored spot you would use: index.html#named_anchor The pound sign '#' is a directive that says "look for an anchor in this page with the same name.." or something of the sort.. An example would be: Filename = mypage.html: <html><head></head><body><a name="pageTop"></a><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><a href="mypage.html#pageTop">Go To Top of Page</a></body></html> I hope you could follow that.. it is pretty simple really.. And you don't have to direct to the top of a page, it could be anywhere, wherever you put the <a name="pageTop"></a> tag(s) you can link to.. I hope that helps! Share this post Link to post Share on other sites
nipun 0 Report post Posted May 5, 2005 <meta http-equiv="refresh" content="page.htm;5"> Share this post Link to post Share on other sites
electriic ink 1 Report post Posted May 5, 2005 (edited) <meta http-equiv="refresh" content="page.htm;5"> Just to correct you on your on your code there: <meta http-equiv="refresh" content="5;url=page.htm"> A guide to the key points: refresh - tells the browser to refresh 5 - after 5 seconds page.htm - to the url page.htm Notice from snlildude87: Use tags for HTML codes Edited May 5, 2005 by snlildude87 (see edit history) Share this post Link to post Share on other sites
azka 0 Report post Posted May 10, 2005 I have similar problems in my Java application with Swing. The panels refresh only when I maximize/minimize the frame. Can someone tell me how to rectify this? Share this post Link to post Share on other sites