Skip to content

Instantly share code, notes, and snippets.

@Trippnology
Created May 30, 2013 08:47
Show Gist options
  • Save Trippnology/5676581 to your computer and use it in GitHub Desktop.
Save Trippnology/5676581 to your computer and use it in GitHub Desktop.
Blogger dynamic views jump menu
<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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment