clearing the contents of an input textbox using onblur event handler
<p>i have an input box whose value i want to clear if the user's input is wrong. i want to accomplish this using the onblur event and a javascript function. </p>

<p>this is the textfield i want to apply the onblur function to:</p>

<pre><code>&lt;tr&gt;
     &lt;td&gt;&lt;input id="TryMe" type="text" onblur="checkMe('TryMe')"/&gt;&lt;/td&gt;
&lt;/tr&gt;
</code></pre>

<p>the function that does that is this:</p>

<pre><code>&lt;script&gt;

function checkMe(elemID){

    elem = document.getElementById(elemID);

    if (elemID.value == "CORRECT"){
        alert ("you are correct!");
    }

    else{

          document.getElementById(numericElemID).value="";
          document.getElementById(numericElemID).focus();
          return false;

    }

}
</code></pre>

<p></p>

<p>and it works as i intend it to. however, why is it that when i remove the "return false;" part, it does not work anymore:</p>

<pre><code>        else {
        document.getElementById(numericElemID).value="";
        document.getElementById(numericElemID).focus();
    }
</code></pre>

<p>EDIT: including the javascript and the text input</p>
