Get the anchor of an URL in Javascript

[2009-06-17]

If you think about it, it does make sense. But it might not be the first thing to come up with when you need to solve the problem. But you can get the anchor of an url like this:

window.location.hash

So, to scroll to and open a hidden div in Prototype, try this

Event.observe(window, 'load', function() {
  if (window.location.hash) {
    try { $$(window.location.hash).first().show(); } catch(e) { }
  }
});

-> more

 

New look

[2009-06-09] (1 comment)

It was about time to spend a bit of time on my site. I was running a rather old, customized and modified wordpress blog. The content did't get updated. I was busy, I changed, and finally it became a site that I lost feeling with.

A bit more nerdy now. I hacked away in PHP and the Zend Framework for a bit, and made this awfully simple site with a little CMS behind it. The design is based on how the worldwideweb looks like through the console based Lynx browser.

I made this site in Vim on Gentoo, using Git for versioning control. It is tested in Firefox (with the wonderful Vimperator extension) and debugged with Firebug. It's been hanging around on a local harddisk, and it's about time to be pushed into the (wide) world (wide web). The old content is gone (archived) and I hope to add some new stuff once in a while.

Mind, that the secret museum of mankind is still there where it used to be.

-> more