This week's giveaway is in the Spring forum.
We're giving away four copies of Microservices Testing (Live Project) and have Chris Love & Andres Sacco on-line!
See this thread for details.
Win a copy of Microservices Testing (Live Project) this week in the Spring forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Liutauras Vilda
  • Henry Wong
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Al Hobbs
  • Carey Brown
Bartenders:
  • Piet Souris
  • Mikalai Zaikin
  • Himai Minh

how to remove # from url while using parent.location.hash

 
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hii.......all

i have certain buttons on simple html page...nw i want to change the url on click over each button without refreshing the page...i.e the page should remain same only the url gets change.

actually i tried it by javascript using parent.location.hash and even the result which i get is perfect the only issue is that hash comes with the url.
consider an example........my home page is www.homepage.com/test

nw if i am using parent.location.hash="sitename/testingsite"

then the url changes to www.myhomepage.com/test#sitename/testingsite

nw the only issue is # i want to remove hash from that url ,please suggest me.
 
Sheriff
Posts: 9695
43
Android Google Web Toolkit Hibernate IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If you set the hash, the hash symbol will be there. if you want to remove that, that will be like changing the url which will refresh your page. What do you basically want to achieve??
 
vikas malviya
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Ankit Garg wrote:If you set the hash, the hash symbol will be there. if you want to remove that, that will be like changing the url which will refresh your page. What do you basically want to achieve??






actuallly i have created a website in which all the data are store in index page..eg homepage,aboutus,contact ..and i fetched the data using ajax.since i am fetching the data through ajax the url is not changing..but i wanted to change the url without refreshing the page means as we click on aboutus the ajax will bring the page but at the same time the url should change to ABOUT US path.......is there any way ??
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic