title: JavaScript & JSP Text Fields Won't Clear
body: <p>I've found many examples online on how to clear the same text field you click on, but I'd like the user to click on text field 1 and it clear text field 2, and vice versa.</p>
  
  <p>Been struggling on this for hours. The problem I'm having is I'm having no errors, no output, and it doesn't work. I have no idea what the problem is.</p>
  
  <p>My code:</p>
  
  <pre><code>&lt;jsp:useBean id="speed" class="java.lang.String" scope="request" /&gt;
  &lt;jsp:useBean id="force" class="java.lang.String" scope="request" /&gt;
  
  &lt;script&gt;
      function clearSpeed() {
          var x = document.getElementByID(speed);
          x.value = "";
      }
  
      function clearForce() {
          var x = document.getElementByID(force);
          x.value = "";
      }
  &lt;/script&gt;
  
  &lt;input type="text" id="speed" onfocus='clearForce()' value="&lt;%=speed%&gt;"&gt;
  
  &lt;input type="text" id="force" onfocus='clearSpeed()' value="&lt;%=force%&gt;"&gt;
  </code></pre>