Blogger Dynamic Views drop down menu

I really didn’t like the Link List solution so I knocked up a jump menu which takes up far less space. To add this to your own blog, simply add a new HTML/Javascript widget and paste in the following code (remember to change the URLs to your own blog).

<script>
function openDir( form ) {
var newIndex = form.blogviewselect.selectedIndex;
if ( newIndex == 0 ) {
alert( "Please select a view" );
}
else {
cururl = form.blogviewselect.options[ newIndex ].value;
window.location.assign( cururl );
}
}
</script>
<form name="blogview">
<select name="blogviewselect" size="1" onchange="openDir( this.form )">
<option>Change Blog View</option>
<option value="http://blog.trippnology.com/view/flipcard" />Flipcard</option>
<option value="http://blog.trippnology.com/view/mosaic" />Mosaic</option>
<option value="http://blog.trippnology.com/view/sidebar" />Sidebar</option>
<option value="http://blog.trippnology.com/view/snapshot" />Snapshot</option>
<option value="http://blog.trippnology.com/view/timeslide" />Timeslide</option>
</select>
</form>
view raw gistfile1.html hosted with ❤ by GitHub

If you have a better way of doing the same thing (i.e; some better JavaScript), please post in the comments.