Code

Code I’ve written, used, or like.

Formatta deserves more attention

A while back I posted that I *hate* Adobe’s PDF concept. Here’s a little re-cap of why:

It’s a dead end. You can’t mark it up for revision except in printed form.

It’s restricting – you can’t get halfway through a 10 page form, decide to save, and come back later. Can’t save the form at all, actually (not without an elaborate server-side process).

It’s defacto. PDF this, PDF that. For publishing a whitepaper, sure, it’s not bad. For creating a usable form/document/interactive experience, it sucks.

The saga continues: I spent 26 consecutive hours at work last week creating HTML/CSS/Javascript versions of the PDF forms I’m working with so that the data and form can be stored in a single document. CSS handles formatting the data well, Javascript handles filling the form fields, numbering the pages, etc. They’re pretty cool HTML forms. But they still print poorly (footers aren’t really at the foot), and different browsers still display them differently.

And then Saturday, out of frustration with no good answers, I flexed my search term imagination and discovered the best solution I can imagine…

Here’s the competition, and IMHO, the clearly better alternative: Formatta Filler. The Formatta software, like a PDF, presents a form that the user can’t alter (except to fill in fields). BUT, the user can save his data – combining the form with the data, and preserving it’s ability to be edited later. It handles submission via http better than Reader does (more formats, easier to use), and it’s also free.

The designer app costs more than Adobe Acrobat, I’ll grant you, but it’s still just $1,000. That’s not a bad deal for such a great improvement over PDF’s.

There’s not much about them on the internet, so I’m posting here so others will notice. They ought to put the PDF in its grave.

Note to self: zFeeder

Need to remember to hook up zFeeder so I can show RSS feeds here. Hrm. I might eventually combine Fark, My Yahoo, and Neowin, and not have to visit any other page on the web. Automation is good.

Proper Case

This is the quickest way to get Proper Case in ASP/VBScript code that I’m aware of. Had need of it today, figured I’d stick it here, too. Just insert it at the top of your page, and Poof. Function available.

<script language=jscript runat=server>
function toTitleJscript(str) {
        return str.replace(/\s[a-z]/g, function (str, n) { return str.toUpperCase(); });
}
</script>

And for kicks, here’s the similar Capitalize version:

<script language=jscript runat=server>
function toCapsJscript(str) {
        return str.replace(/\b[a-z]/g, function (str, n) { return str.toUpperCase(); });
}
</script>