Never been to DZone Snippets before?

Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world

About this user

« Newer Snippets
Older Snippets »
Showing 1-2 of 2 total  RSS 

Blogger Archive Menu XHTML Valid

Runs the archives backwards, so that the most recent month is at the top of the menu.

     <ul class="archive-list"><li><select name="archivemenu" id="archivemenu"
style="width:100%;background-color:#000000;color:#006666;font-weight:bold;"
onchange="document.location.href=this.options[this.selectedIndex].value;" >
<option selected="selected" value="archives">archives</option>
</select></li></ul>
<script type="text/javascript">
<!--//--><![CDATA[//><!--
var archives = new Array();

<BloggerArchives>
archives[archives.length] = new Array('<$BlogArchiveURL$>', '<$BlogArchiveName$>');
</BloggerArchives>
var theSel = document.getElementById('archivemenu');
for (var i=archives.length-1;i>=0;i--) {
var newOpt = new Option(archives[i][1], archives[i][0]);
var selLength = theSel.length;
theSel.options[selLength] = newOpt;

}
//--><!]]>
</script>

Blogger Previous Posts Menu XHTML valid

Previous Posts in a drop down menu.

Recent Perversions can be changed to whatever you want to show up as the title of your menu.

<ul><li>
<select name="previouspostsmenu" id="previouspostsmenu"
style="width:100%;background-color:#000000;color:#ffffff;font-weight:bold;"
onchange="document.location.href=this.options[this.selectedIndex].value;" >
        <option selected="selected" value="Recent Perversions">&nbsp;Recent Perversions</option>
               <BloggerPreviousItems>
                     <option value="<$BlogItemPermalinkURL$>"><$BlogPreviousItemTitle$></option>                  
                  </BloggerPreviousItems>
               </select></li></ul>
« Newer Snippets
Older Snippets »
Showing 1-2 of 2 total  RSS