The first part to hit the bin on dismantling the Megane…
A BMC pod filter installed with electrical tape:
I am making the following ‘LEGACY’ image available in an ‘EPS’ format for Subaru Legacy owners who’d like to make vynal stickers for their car. This uses the official Legacy font and the graphic looks something like this:
![]()
The EPS can be cut by a vynal sticker cutter in any colour. What it looked like on my vehicle:

In an experiment to display text/paragraphs in a newspaper-style multi-column layout lead me to Randy Simons’ Automatic Column text source-code. This neat piece of JavaScript code re-arranges paragraphs to fit liquidly-sized columns of text into the available space, maintaining equal heights for each column. It’s really neat in a liquid layout because dependent on the size of a users browser viewable area or screen resolution it will show either fewer or more columns based on your desired ‘em’ size for your columns.
Yes, a completely CSS solution is ideal – and hopefully this is only a year or so from being reality with the latest browsers – but in the meanwhile this solution degrades when the user doesn’t have JavaScript and is fast.
Any interesting read is the A List Apart article CSS Swag: Multi-Column Lists.
My use-case uncovered some minor problems with the script; it didn’t deal with images embed within the paragraphs of text, short blocks of text where columns just didn’t work, I needed a way to toggle the columns on and off (as some users didn’t like them) and while making this addition to the site it seemed like a good time to implement an Increase/Decrease font-size feature.
So the script modifications and samples presented below implement these changes.
Of note; the web-site that these modifications were developed for no longer uses this script. Why? Multiple columns introduce a few problems, so have a think about your use-case.
Please see “multicolumn-sample.html” in the sample or download links below for a complete implementation. There is also a sample in the multicolumn-development.js file including an advanced tweak I will mention below.
These are the steps for a minimum implementation:
<script type="text/javascript" src="multicolumn.js"></script>
<script type="text/javascript" src="multicolumn-helper.js"></script>
<style type="text/css"><!--
@import url(multicolumn.css);
--></style>
<div class="multicolumn"><div>
<p>
Paragraph content.
</p>
<p>
Paragraph content.
</p>
</div></div>
If you would like to customise the default minimum column widths there is a quick comment in multicolumn-development.js but I will repeat it here. You will need to tweak the CSS in multicolumn.css. Specifically the following rule where 22em can be adjusted up or down.
.multicolumn-Columnized div {
...
width: 22em;
...
}
You will see in the sample below how to use the new multicolumnHelper class, but for reference it is as simple as including the following HTML code snippet in your page – customise the display as you see fit whether that be graphical buttons or making the list ‘inline’. These font size helpers will work whether the columns are turned on or off.
<ul>
<li><a href="#" id="multicolumn-ColumnsButton" onclick="return multicolumnHelper.toggleColumns(this)">Hide Columns</a></li>
<li><a href="#" onclick="return multicolumnHelper.fontIncrease(this)">Font Larger ++</a></li>
<li><a href="#" onclick="return multicolumnHelper.fontDecrease(this)">Font Smaller --</a></li>
</ul>
Hopefully these changes are of use. And credit again to Randy Simons for the bulk of the code.
The standard alpha-numeric regular expression validation [a-zA-Z0-9]+ is not suitable for multi-lingual Unicode string validation.
In a multi-lingual software environment, you’ve set up your Unicode database table columns and set your interface to accept the UTF-8 character set – but you want to validate your user’s input. That is to say you still want ‘alpha-numeric’ validation but need to accept Latin accented characters and or even Chinese, Taiwanese etc character sets – you don’t want special characters like !”£$%^& etc. But of course you could modify the combinations below to suit your needs.
Here is a regex expression code snippet with comments that will help you validate the input.
/**
* A localised string valid characters.
*
* Numbers
* [\u0030-\u0039]+
* English alpha characters
* [\u0041-\u005a\u0061-\u007a]+
* Underscore and hyphen
* [\u002d\u005f]+
* Quote, apostrophe, punctuation
* [\\u0022\u0027\u00b4]+
* Whitespace
* [\\s]+
* Latin-1 Supplement - With excess removed, only leaving characters
* Suitable for; German, Italian, Portuguese, Spanish.
* [\u00c0-\u00ff]+
* Latin-1 Supplement - Extra characters
* Suitable for Dutch as per http://en.wikipedia.org/wiki/ISO/IEC_8859-1
* [\u0131-\u0132]+
* Latin-1 Supplement - Extra characters
* Suitable for French as per http://en.wikipedia.org/wiki/ISO/IEC_8859-1
* [\u0152\u0178]+
* Chinese Characters
* [\u4e00-\ud7a3]+
*/
private static final String VALID_CHARS = "[\u0030-\u0039\u0041-\u005a\u0061-\u007a\u002d\u005f\\s\\u0022\u0027\u00b4\u00c0-\u00ff\u0131-\u0132\u0152\u0178\u4e00-\ud7a3]+";
In Java you might use this something like:
private Boolean isValidChars(String inputValue) {
return (inputValue != null && !inputValue.matches(VALID_CHARS) ? false : true);
}
In JavaScript the same can be used like:
function isValidChars(inputValue) {
var VALID_CHARS = /[\u0030-\u0039\u0041-\u005a\u0061-\u007a\u002d\u005f\u0022\u0027\u00b4\s\u00c0-\u00ff\u0131-\u0132\u0152\u0178\u4e00-\ud7a3]/gm;
return inputValue.match(VALID_CHARS);
}
I’m sick of date pickers, date pickers where I have to click Next, Next, Next or Previous, Previous, Previous or some little arrow to find the month I want to pick. Even worse the date pickers that still rely on three HTML select box drop-down to choose the Day, Month & Year. And then, particularly on travel web-sites you typically want to select a from and to date range – don’t always give me two date pickers!
So, obviously I’ve been using a number of date pickers on different web-sites recently and I wouldn’t have this rant if I didn’t think there was a much better way to do it. There is and I’ve started a personal project “Calender Planner” which I hope to provide the ultimate JS/HTML date picker. What in my mind does the ultimate date picker have to do/provide?
But those “requirements” alone don’t make for an ultimate date picker. Calender Planner more specifically will include the following set of wish-list features.
Should it work without JavaScript and or CSS? At this point I’m sure I will annoy some people and say, no & yes. No it doesn’t need to work without JavaScript and yes it should work without CSS. So Calendar Planner is designed so that it will work on devices/web-browsers with CSS switched off. It’s not going to look like a pretty calendar, but the days and ranges selected will be laid out in such a way that they are usable. And wait, the JavaScript – well, this is a Web2.0 world and you really didn’t expect Calendar Planner to work without Javascript? But the fall-back will be documented, have your three; day, month & year select drop-downs coded into your page. If there’s no JavaScript these will act as your date picker.
The name “Calendar Planner” hopefully gives hint that there is more to the project than just a date picker, and largely the phrase Planner is applicable because with a date picker as flexible as this it should lead very well to being able to more easily plan date based activities – hence I see this project being very useful for web-sites such as those providing travel and flight bookings (largely the type of web-site I have recently been using and have been frustrated by their date picker functionality).
Watch this blog.
Web development related bookmarks. Also see my list of JavaScript specific bookmarks.
Rally related bookmarks. Including British rallying, WRC and Western Australian rallying links.
These are travel related bookmarks that I have found useful when booking hotels, hiring cars or for places I have stayed and might stay again.
JavaScript related bookmarks that I have found useful. Also see my general Web-Development bookmarks list.
My collection of miscellaneous Gen 2 Subaru Legacy Photos – Part 3 of 3.
These photos are from my private collection that I have saved from the Internet. If your photos are within this gallery and you want them removed please contact me or post a comment for each photo with a link to your site! I do not profit from publishing these photos, hopefully Legacy fans do though – should be a few hours worth of drewling.