title: JavaScript Validating Currency Amount
body: <p>I am trying to validate a currency value in a shopping cart so that if it is less than $50 it hides the check out button. I have used the same script for min order units and it worked, but not for currency. Code below</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
  setTimeout ("checkout()", 10 );
  function checkout() {
      var tu = document.getElementById('cost').innerHTML;
      if (tu &lt; 50) {
          document.getElementById('buyvalidation').style.display='none';
          document.getElementById('no').style.display='block';
      } else {
          document.getElementById('buyvalidation').style.display='block';
      }
      setTimeout ( "checkout()", 10 );
  }
  &lt;/script&gt;
  </code></pre>