title: Object or Property is not supported
body: <p>I'm trying to standardize hacks in a library to use JavaScript to customize an Enterprise Platform that is very difficult to write client side code.  Basically what I am trying to do, is allow a user to pass in the a reference to the data they want and regardless of how it's stored, I will try to get it using a couple of pre-defined methods.  I know this process isn't pretty, but there aren't any alternatives for what we're trying to do.</p>
  
  <p>I'm using jQuery 1.6.2 and bound to this due to dependencies of other libraries.</p>
  
  <p>The following line:</p>
  
  <p><code>if ($('input[id^=' + lineItemAttributeId + ']').length &gt; 0) {</code></p>
  
  <p>is giving the following error: Object doesn't support this property or method in IE8, but no other platform.</p>
  
  <pre><code>Services.prototype.getAttributeValue = function(docNum, variableName, defaultValue) {
    if (docNum == "1") {
      var quoteItemAttributeId = variableName;
      if ($('input[id*=' + quoteItemAttributeId + ']').length &gt; 0) {
        return $('input[id*=' + quoteItemAttributeId + ']').val();
      } else if ($('textarea[id*=' + quoteItemAttributeId + ']').length &gt; 0) {
        return $('textarea[id*=' + quoteItemAttributeId + ']').val();
      } else if ($('select[name*=' + quoteItemAttributeId + ']').length &gt; 0) {
        return $('select[name*=' + quoteItemAttributeId + ']').find("option:selected").val();
      } else {
        return defaultValue;
      }
    } else {
      var lineItemAttributeId = docNum + "_" + variableName;
      if ($('input[id^=' + lineItemAttributeId + ']').length &gt; 0) {
        return $('input[id^=' + lineItemAttributeId + ']').val();
      } else if ($('textarea[id*=' + lineItemAttributeId + ']').length &gt; 0) {
        return $('textarea[id*=' + lineItemAttributeId + ']').val();
      } else if ($('select[name*=' + lineItemAttributeId + ']').length &gt; 0) {
        return $('select[name*=' + lineItemAttributeId + ']').find("option:selected").val();
      } else {
        return defaultValue;
      }
    }
  };
  </code></pre>
  
  <p>I have tried:</p>
  
  <p><code>if ($('input[id=' + lineItemAttributeId + ']').length &gt; 0) {</code></p>
  
  <p><code>if ($('input[id*=' + lineItemAttributeId + ']').length &gt; 0) {</code></p>
  
  <p>with similar results.</p>
  
  <p>Any idea on what I am doing wrong?</p>