Archive for October, 2006

Problems with Javascript in Safari

Tuesday, October 31st, 2006

document.location.hash = “#anchorName” does not do what you might expect. Looking at the addressbar, I see “http://mydomain.com/mypage.html#%23anchorName” instead. Apparently, you need to omit the hash mark for Safari. Luckily it seems to work on other browsers too. The O’Reilly book Javascript: The Definitive Guide states that location.hash includes the “#”, but […]