• Post Reply Bookmark Topic Watch Topic
  • New Topic

Adding anchor tag to URL

 
Rik Sweeney
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I have a tree of items in a web page which the user can click on to expand, which when they do, will submit a form and go to the servlet to process the results. It will then populate the expanded branch with the items and show the page again.
Now, if the user had to scroll down the page to expand a branch, I don't want the user to have to scroll back down again to see the results. This will become even more annoying if the data is deeply nested. I'd rather rewrite the URL to add an anchor tag so that the browser jumps to the write point.
Is this possible to do?
Thanks
Richard
 
Ray Stojonic
Ranch Hand
Posts: 326
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

[ January 21, 2004: Message edited by: Ray Stojonic ]
 
Rik Sweeney
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I was thinking of just using a #
i.e.
http://localhost/test/tree#item5
to make it jump to the item since I can, in the HTML, write
<A NAME="item5">Item</A>
Writing that part is easy, making the servlet append the #item5 part to the end of the URL once I'm done processing is the bit I'm really after.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!