Page is a not externally linkable
- Code, Content, and Presentation
-- JavaScript and AJAX
---- JavaScript location = bookmark/id on same page?


Dabrowski - 10:05 am on Apr 27, 2007 (gmt 0)


ok, I got it down to 1 line:

location.href = location.href.replace( /(#\w*)?$/, newHashName);

No need for fixurl, no need for that long winded IF statement, what were you thinking Drag_Racer? ;)


Thread source:: http://www.webmasterworld.com/javascript/3320399.htm
Brought to you by WebmasterWorld: http://www.webmasterworld.com