title: boolean is not a function in javascript
body: <p>I have the following javascript where I am reading in a word and writing out a translation, but I keep getting the error <code>boolean is not a function</code></p>
  
  <pre><code>function translate() {
  var word = $("#prodId").val();
  
  $.getJSON("api/translation?word=" + word,
              function (data) {
  
                  $("#word").text(data.TranslatedWord);
              })
              .fail(
                  function (jqXHR, textStatus, err) {
                      $("#word").text('Error: ' + err);
                  });
                      }
  </code></pre>
  
  <p>The following method which is basically the same thing, but uses an integer works fine:</p>
  
  <pre><code>function find() {
         var id = $("#prodId").val();
         $.getJSON("api/products/" + id,
              function (data) {
                  var str = data.Name + ': $' + data.Price;
                  $("#product").text(str);
              })
              .fail(
                  function (jqXHR, textStatus, err) {
                      $("#product").text('Error: ' + err);
                  });
                      }
  </code></pre>
  
  <p>Here is a snippet of the HTML:</p>
  
  <pre><code>&lt;div id="body"&gt;
      &lt;div class="main-content"&gt;
          &lt;div&gt;
              &lt;h1&gt;All Products&lt;/h1&gt;
              &lt;ul id="products" /&gt;
          &lt;/div&gt;
          &lt;div&gt;
          &lt;label for="prodId"&gt;ID:&lt;/label&gt;
          &lt;input type="text" id="prodId" /&gt;
          &lt;input type="button" value="Translate" onclick="translate();" /&gt;
          &lt;p id="word" /&gt;
          &lt;/div&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  
  &lt;script type="text/javascript"&gt;
  $(document).ready(function () {
      // Send an AJAX request
      $.getJSON("api/products/",
                function (data) {
                    // On success, 'data' contains a list of products.
                    $.each(data, function (key, val) {
  
                        // Format the text to display.
                        var str = val.Name + ': $' + val.Price;
  
                        // Add a list item for the product.
                        $('&lt;li/&gt;', { text: str })
                        .appendTo($('#products'));
  
                    });
  
                });
  
  });
  
      function find() {
          var id = $("#prodId").val();
          $.getJSON("api/products/" + id,
                    function (data) {
                        var str = data.Name + ': $' + data.Price;
                        $("#product").text(str);
                    })
          .fail(
              function (jqXHR, textStatus, err) {
                  $("#product").text('Error: ' + err);
              });
      }
  
      function translate() {
          var word = $("#prodId").val();
  
          $.getJSON("api/translation?word=" + word,
                    function (data) {
  
                        $("#word").text(data.TranslatedWord);
                    })
          .fail(
              function (jqXHR, textStatus, err) {
                  console.log(err);
  
                  $("#word").text('Error: ' + err);
              });
      }
  
  
  
  
  &lt;/script&gt;
  </code></pre>