jQuery in Action, 3rd edition
The moose likes HTML, CSS and JavaScript and the fly likes go to Top page Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "go to Top page" Watch "go to Top page" New topic

go to Top page

anamika bansal

Joined: Nov 23, 2007
Posts: 6
I have used <a name="top"/> and <a href="#top">Go to Top<a> ,to go to top of the jsp page but problem what i am facing is that all the data entered by the user before clicking on the link (Go to Top) gets removed or flushed or you can say page is getting refreshed.
Stan James
(instanceof Sidekick)
Ranch Hand

Joined: Jan 29, 2003
Posts: 8791
Here are some tips on scrolling with JavaScript. Are you comfortable with making a link or button run some script?

A good question is never answered. It is not a bolt to be tightened into place but a seed to be planted and to bear more seed toward the hope of greening the landscape of the idea. John Ciardi
anamika bansal

Joined: Nov 23, 2007
Posts: 6
Thanks for the code.Its working fine according to my requirement
It is sorta covered in the JavaRanch Style Guide.
subject: go to Top page
It's not a secret anymore!