|
-
Apr 8th, 2004, 12:37 AM
#1
Thread Starter
New Member
Goto a location on the WebPage without scrolling
I have a hyperlink to UPDATE the contents of my Web page. Upon click of the UPDATE link, i'm submitting the page to do the db update at the server end.
Everytime i click Update the webpage gets scrolled to the top. I need to hold the page exactly at the same point after the Update process.
I understand that this is possible by using...
<a href="#C4">Click here to Goto Para-4</a>
<a name="C4"><h2>Para-4</h2></a>
But this would require user intervention to goto that location in my page.
But i want to make it all happen when i click on Update and submit the page.
Is there a way, that after the page is being posted to directly goto a location in the page.
Please let know !
-
Apr 8th, 2004, 12:39 PM
#2
Javascript 
Code:
function moveToHash(hashName) {
window.location.hash = hashName;
}
moveToHash("C4");
-
Apr 22nd, 2004, 04:55 PM
#3
Thread Starter
New Member
Thanks! axion_sa
It worked !!!
-
May 2nd, 2004, 08:32 PM
#4
Frenzied Member
that a cool bit of code
Magiaus
If I helped give me some points.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|