3

If I want to show specific part of page in using #id in the url.

so for example my url is:

www.example.com/#geometry

When I reload my page I want all the targets (#geometry) on the url to be removed before reload. So there would be only www.example.com.

How can I do this?

Update: i don't know what my url be it is generated from server side see this my url

       localhost:8080/home?requestParams=%7B%22tabMode%22 

and now to view any part of that page i add

       #id 

so it becomes

     localhost:8080/home?requestParams=%7B%22tabMode%22#geometry

, now on reload of this page i want to remove this #geometry how can i do it any idea?

CY5
  • 113
  • 1
  • 1
  • 7
  • i want that whenever i click on reload or any button that reloads the page , the id in url should disappear – CY5 Aug 12 '14 at 07:51

1 Answers1

0

location.hash='';

At the start of your script.

  • i don't know what my url be it is generated from server side see this my url http://localhost:8080/home?requestParams=%7B%22tabMode%22 and now to view any part of that page i add #id so it becomes http://localhost:8080/home?requestParams=%7B%22tabMode%22#geometry, now on reload of this page i want to remove this #geometry how can i do it any idea – CY5 Aug 12 '14 at 07:55