scriptygoddess

16 Mar, 2003

Drop down month archives

Posted by: Jennifer In: Scripts

I'm clearing out some of my templates and had this in a test page. I don't know if I ever posted the code here, so just in case I hadn't, here's the code to create a dropdown "jump box" that will forward you to the selected month's archive.

(Script assumes you are on MT. No php needed here – this one is all javascript)

<form name="jump2">
<select name="myjumpbox"
OnChange="document.location=jump2.myjumpbox.options[selectedIndex].value">
<option selected>Please Select…</option>
<MTArchiveList archive_type="Monthly">
<option value="<$MTArchiveLink$>"><$MTArchiveDate format="%B %Y"$></option>
</MTArchiveList>
</select>
</form>

kind of like this:

11 Responses to "Drop down month archives"

1 | blake

March 16th, 2003 at 11:17 am

Avatar

i use several drop down form elements to jump around from photo to photo in my gallery and while everything works great i am killing myself trying to figure out how to get the select box wider. there doesn't appear to be a way to specify the width.

i've tried making the initial selection longer, specifying width, cols, etc and nothing seems to work – many of the titles still appear clipped.

does anyone have a clue how to change the width of this specific form element? i ask here because i'm thinking it has something to do with the way the movabltype tags are processed…

the code i use is:
<form>
<select onChange="document.location=options[selectedIndex].value;" class="jumpbox">
<option value="">chronological archives…</option>
<MTArchiveList archive_type="Individual">
<option value="<$MTArchiveLink$>"><$MTArchiveTitle$></option>
</MTArchiveList>
</select>
</form>

2 | Scott

March 16th, 2003 at 3:15 pm

Avatar

i included the following in my CSS file. The width:140 specifies how wide the jump box should be. if you want to have different width or styles you can call an class you want (notice how the sample code has class="jumpbox")

select.jumpbox {
background-color: #eee;
color: #000;
font-size: 9pt;
text-decoration: none;
width: 140;

3 | ben

March 18th, 2003 at 6:49 pm

Avatar

I would like the archived page to come up in a pop up window. Any way that can be combined with the drop-down jumpbox? I've tried a few alternatives, but can't seem to get it right…. Appreciate any hint in the right direction!

4 | Robin

April 18th, 2003 at 8:30 am

Avatar

Oh, I ao so excited, I used the same code to create a drop down box of my categories as well!

I love saving the space!

<form name="jump2">
<select name="myjumpbox"
OnChange="document.location=jump2.myjumpbox.options[selectedIndex].value">
<option selected>Please Select…</option>
<MTArchiveList archive_type="Category">
<option value="<$MTArchiveLink$>"><$MTArchiveTitle$></option>
</MTArchiveList>
</select>
</form>

5 | Mariela

June 26th, 2003 at 11:33 am

Avatar

Thank you all so very much. I'm going to use this for my monthly archives and catagoreis.

6 | george

September 17th, 2003 at 9:30 pm

Avatar

just wandering ,how would this work of you use php and mysql. How would you make a dropdown menu.

7 | The Realm of Chadness

August 17th, 2003 at 5:46 pm

Avatar

A Couple Changes
As you may have noticed, I condensed the monthly and category archives into drop-down boxes to save some space on

8 | my:dentity

September 28th, 2003 at 12:33 pm

Avatar

Movable Type Enhancements
In trying to determine whether Movable Type (MT) was a feasible backend for OK/Cancel, I found a variety of sites and discovered just how big the MT community really was. If there's a function you can think of (and many…

9 | 布拉格的春天 - Frey 的網路誌

May 3rd, 2004 at 7:47 pm

Avatar

分月彙整改為下拉選單
  參考了 Scriptygoddess 的文章,將日益增加的分月彙整改成了下拉式的選單,以免版面愈來愈長,大家的臉也…….

10 | 布拉格的春天 - Frey 的網路誌

May 3rd, 2004 at 7:47 pm

Avatar

分月彙整改為下拉選單
  參考了 Scriptygoddess 的文章,將日益增加的分月彙整改成了下拉式的選單,以免版面愈來愈長,大家的臉也…….

11 | /blog

January 12th, 2005 at 7:07 pm

Avatar

the archives are back
some time ago i deleted the archives in the sidebar, because the were using up too much screen-realestate. since people complained that my archives are hard to grab, i spent 20 seconds implementing a nice trick posted over at…

Featured Sponsors

Genesis Framework for WordPress

Advertise Here


  • Scott: Just moved changed the site URL as WP's installed in a subfolder. Cookie clearance worked for me. Thanks!
  • Stephen Lareau: Hi great blog thanks. Just thought I would add that it helps to put target = like this:1-800-555-1212 and
  • Cord Blomquist: Jennifer, you may want to check out tp2wp.com, a new service my company just launched that converts TypePad and Movable Type export files into WordPre

About


Advertisements