title: IE "Microsoft JScript runtime error: Object expected"
body: <p>I have problems with regards to javascript only when using IE. The error I am getting is "Microsoft JScript runtime error: Object expected" and I have no idea why. It is then jumping into the JQuery 1.4.2 file, without giving me a proper error message.</p>
  
  <p>All I am doing is simply reading on page load the raw URL, and getting a query string named Search. Using that in an AJAX call to return products and put then into a DIV. No biggies, but somehow IE is managing to blow my page up :-(</p>
  
  <p>Any ideas? Code as follows : </p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
      $(document).ready(function (e) {
          $('.boxLoader').show();
  
          function getParameterByName(name) {
              name = name.replace(/[\[]/, "\\\[").replace(/[\]]/, "\\\]");
              var regexS = "[\\?&amp;]" + name + "=([^&amp;#]*)";
              var regex = new RegExp(regexS);
              var results = regex.exec(window.location.href);
              if (results == null)
                  return "";
              else
                  return decodeURIComponent(results[1].replace(/\+/g, " "));
          }
  
          var Search;
          Search = getParameterByName("search");
  
          $('#searchCriteria').text(Search);
  
          $.get("/Handlers/processProducts.aspx", { SearchCriteria: Search }, function (data) {
              $('#innercontent').html(data);
              $('#innercontent').fadeIn(200);
              $('.boxLoader').fadeOut(200);
          });
  
          $('#searchBox').live("click", function () {
              $.get("/Handlers/processProducts.aspx", { SearchCriteria: $('#searchCriteria').val() }, function (data) {
                  $('#innercontent').html(data);
                  $('#innercontent').fadeIn(200);
                  $('.boxLoader').fadeOut(200);
              });
          });
      }); 
  &lt;/script&gt;
  </code></pre>