StyncAnyday
New Member
hello i have a question that will be found very often. the problem is that nowhere can be found an explicit solution.i have two problems regarding anchors.the main goal should be to get a nice clean url without any hashes in it while using anchors to jump on a page.so the structure of the anchors is:\[code\]<ul> <li><a href="http://stackoverflow.com/questions/13735912/#one">One</a></li> <li><a href="http://stackoverflow.com/questions/13735912/#two">Two</a></li> <li><a href="http://stackoverflow.com/questions/13735912/#three">Three</a></li></ul><div class="wrap"> <a name="one">text 1</a> <a name="two">text 2</a> <a name="three" class="box">text 3</a></div>\[/code\]okay, if you will click one of the links the url will automatically change to \[quote\] www.domain.com/page#1\[/quote\]at the end this should be just:\[quote\] www.domain.com/page\[/quote\]so far so good. now the second thing is, when you search the internet for that problem you will find javascript as a solution.i have found this function:\[code\]function jumpto(anchor){ window.location.href = "http://stackoverflow.com/questions/13735912/#"+anchor;}\[/code\]and calling that function with:\[code\]<a onclick="jumpto('one');">One</a>\[/code\]what will be the same like before. it will add the hash to the url. i also added\[code\]<a onclick="jumpto('one'); return false;">\[/code\]without success. so if there is someone who could tell me how to solve this i really would appreciate.Thanks alot.