Tag: code

  • How I use utm_source, utm_medium, utm_campaign from Google Analytics

    My friend Adam called me this evening to ask how I’ve used the Google Analytics tracking codes utm_source, utm_medium, and utm_campaign. He’s working on an app to help marketers generate HTML e-mails, and is thinking about automating the inclusion of these tracking codes. The utm_medium is pretty straightforward in that the medium would be values […]

  • Small-caps, web text, and CSS

    There’s a trick to getting small-caps to work on the web, and it’s counter-intuitive. Let’s say you had an abbreviation, like CSS, that you wanted to put into small-caps, say with a little extra tracking. You might think you could use the CSS property font-variant: small-caps, and you’d be good to go. Not so. Here’s […]

  • The problem with the line break (BR) tag

    We’ve got the <br /> tag all wrong. It’s time to make it right. We all know the <br /> tag is used to insert a line break in HTML. But what we’ve been missing is that we were too often after something else. Let me explain. Common reasons to use line breaks Why would […]

  • Google Analytics for WordPress (version 4.09) trips HTML validation when tracking outbound links

    When I write HTML, running code through the W3C Validator is part of my process. If the code doesn’t pass the validator, there’s a slim chance I’ll consider that code ready for anything. So after I upgraded this blog to WordPress 3.01’s Twenty Ten theme, I was mildly irritated to find that I had a […]

  • I got to help UXmatters with print styling

    A few months ago I contacted UXmatters online magazine to let them know of a problem I had printing out articles with Firefox. The first page would print, but that was all. I could switch to Safari and print fine, but that just didn’t seem right. I found out that they were a little shorthanded […]

  • jQuery: Show password checkbox

    I wrote version 1 of a jQuery plugin during the last couple of days. Read more about jquery.showPasswordCheckbox.js. The basic functionality is to provide a checkbox on web forms to reveal the password text, so people can choose to view the password they are entering as they enter it.

  • XSL to get text from Apple Pages documents

    Pages is the name of Apple’s basic word processor program that comes with their iWork suite of applications. It’s not a bad program, but a number of months ago I needed to switch up to MS Word for the Mac. Well, this morning I was looking through some old files and found a text document […]

  • HTML form fields that, when not selected, do not even send a field name upon submit

    Checkboxes and radio buttons that have not been checked and multiple select lists that have no selection submit nothing upon submission of the form. It’s as though they aren’t even there. At first, this may seem obvious (Well, yeah, you didn’t select them, dummy!), except that it runs counter to every other form field. If […]

  • Ladies and gentlemen: introducing REGEXER.COM!

    My friend Adam has been tapping at the keyboard and pacing again. This time, he’s working on a project called Regexer. For many programmers and Web developers, having to write up a regex (regular expression, a pattern matching utility found in many programming languages) involves having to dig out a book or look up a […]