Categories
Web Development

Placing an invisible validation link on a page

The HTML validator at http://validator.w3.org is a tremendous resource for web developers, helping us to ensure that our pages validate to the W3C standard.

Creating a Validation Link

Many developers place a link to the validator in the header or footer of their site so that they can demonstrate that their site is compliant.

1
<a href="http:///validator.w3.org/check/referer">Valid XHTML</a>

(The /check/referrer string tells the validator to validate what ever page the visitor came from)

Creating an Invisible Validation Link

Sometimes however, I like the link to be invisible, which I do be creating a link to a single non-breaking space entity. I use CSS to ensure that there is no underline and that the link doesn't stand out against a coloured background when the link is hovered over. Of course this means you have to know that there is an invisible hotspot at a certain point on the page. I often put it right after the text in my footer, as users don't often hover the mouse there. (All of this should be on on one line, I've put hard returns here only to keep it from scrolling out of the box.)

1
2
<a href="http:///validator.w3.org/check/referer" 
style="border-bottom: 0px;background-color:inherit;">&nbsp;</a>

Now there's an invisible validation link that I can have on my site throughout development for fast, easy validation checks. When the site goes live I can decide whether to leave it in or not.

Categories
Web Development

Color Schemes

Picking colors schemes (or colour schemes, in the Queen's English) can be difficult, and it's easy to fall into the bad habit of using the colors that have worked in the past.
The trick is to find a source for an online color scheme generator, which will let you browse through sets of complimentary colors to pick a color theme for your site.

Here are some great colour resources to help;

Keywords: color scheme, colour scheme, colour theme, color theme, colour set, colour set.

Categories
Web Development

Getting a website online – for neophytes

You want a website, but haven't a clue how to go about it.  That's OK, everyone who knows how to do it once had to do it for the first time.

Here's a quick guide to getting a website up for very little money, very little work and very quickly.  My solution involves using the free and popular WordPress blogging platform to host your site, and this is a great way to get your first website up and running quickly.

Registering a Domain Name

First, you need to pick a registrar.  That's the company that actually hooks you up with the great registrar of domain names at the heart of the Internet.  Don't worry about the technical details, you really don't need to know unless you want to.  Personally, I don't register my domains where I host my websites.  Too many people lose their domain names in a dispute with a web host when it turns out the web hosting company has control or even technically owns the domain, much to the dismay of the unsuspecting customer.

I use www.easydns.com in to register domains.  It's $20-25/year to register the domain and I've always had good service from them.  If you want to let me have a new affiliate points for pointing you to them use this link to EasyDNS it's your call, I won't beg.

To pick your domain name, go to www.easywhois.com and try out a few names to see if the domain you want is available.  I use that site because they commit to not frontrunning, which is a dirty little trick where a site will offer to do the lookup for you, then slap a 5 day hold on the domain and tell you it's taken, but they can sell it to you – at a price.

When you register your domain name, you'll be asked for the Registrant – that's the legal owner – probably you, as well as Admin, Technical and Billing contacts.  Probably all those people will be you but be sure to keep the info and password in a safe place.  And set a tickler to renew the domain annually.  If you change your email and the reminders don't get to you, you'll lose the domain, which is bad.

Incidentally, you can get a domain registration a little cheaper, but I'm happy to pay an extra $6-7 per year for a registrar who has a good reputation and to avoid registering my domain names where I host my sites.

Setting up your Website

WordPress.com offers two attractive options to host your blog.  If you want to use WordPress to host your site it's free.  But you can also pay them USD$10/year to attach your domain name to their WordPress servers so your domain name is what people go to, not www.wordpress.com.

Either way, you pick one of their WordPress templates.  The template controls the visual appearance of your website.

The downside of using wordpress.com to host your site is that you have to pick one of their templates and there's only minimal customizing possible.  The upside is that they to all the updates automatically – you don't need to worry about maintenance – and it's dirt cheap.

WordPress deals with static content in pages and more chronological content like blogging in posts.  For a resume website you'd want to forget about posts and put up static pages with your resume and contact information.

You can go to WordPress at any time and try them out free.  Join for free and set up http://yourname.wordpress.com.  Experiment with the templates and pick one you like.  There's lots of very good how-to info at http://codex.wordpress.org.  They don't charge for their basic blogging service, but paying the $10 lets you attach your domain name to it, which is a really good idea.

Down the Road

At some point in the future, you can get a hosting plan (roughly $100-$120/year) and use an open source content management system like Joomla to create a more complicated website, but if it's just a resume you'll likely find WordPress all you need and you can't beat the price.

Categories
Database MySQL Web Development

The vagaries of NULL in MySQL

The concept of NULL in SQL, including MySQL, is a little hard to get at first, so the NULL keyword is tough to use as well.

This blog post helps to clarify it.

Categories
DHTML JavaScript Web Development

Selecting All Text in a Form Field with a Single Click

Sometimes the text in a form field is put there primarily for the purpose of being copied to the clipboard.

In these cases a little JavaScript will smooth the process, selecting the full contents of the field on the first click.

Place the following script in the section of your page:

1
2
3
4
5
<script type="text/JavaScript">
function highlight(field) {
       field.focus();
       field.select();
}</script>

Then place onClick='highlight(this);' as an attribute to any field you want treated this way:

1
<input type="text" name="myfield" size="20" value="mytext" onClick='highlight(this);'>