JavaScript: .innerhtml error message form validation
<p>I'm trying to enter an error message above a button using .innerhtml. 
I think I'm close to getting this to work, but I'm stuck. I think there's a really simple semantic error, as I'm new to JS.</p>

<p>Here's my jsfiddle: <a href="http://jsfiddle.net/ajX2U/" rel="nofollow">http://jsfiddle.net/ajX2U/</a></p>

<pre><code>var sel  = document.getElementById("stateType");

    switch(sel.value) {
        case "VA":
            location.href = "http://www.test1.com";
            break;
        case "MD":
            location.href = "http://www.test2.com";
            break;
        case "IL":
            location.href = "http://www.test3.com";
            break;
        case "TX":
            location.href = "http://www.test4.com";
            break;
        case "other":
            location.href = "http://www.test5.com";
            break;
        // oh dear we have selected a wrong option
        default:
            document.getElementById('error').innerHTML = 'Fred Flinstone';
    }
}
</code></pre>
