This snippet is a pretty conventional implementation of using a select box as a navigation menu, but it is complete and concise. So if you need a guide on how to perform this bit of JavaScript magic in Symfony, check it out.
For anyone doing web development — particularly if you are using AJAX — you need to install the Firefox extension Firebug. With this extension your ability to follow the flow of your web applications is unparalleled: from inspecting and modifying the DOM and CSS, monitoring network activity, and debugging JavaScript/AJAX. Check out the site, install the extension, and increase your productivity!