title: Getting error while using .Val() in jquery
body: <p>I am using JQuery and I have got below JQuery Code sample.</p>
  
  <p><strong>JQuery Code:</strong></p>
  
  <pre><code> $.ajax({  
          type: "POST",
          url: "Login.aspx",  // Send the login info to this page
          data: str,  
          success: function(result)
          {  
               // Show 'Submit' Button
              $('#loginButton').show();
  
              // Hide Gif Spinning Rotator
              $('#ajaxloading').hide();  
  
              var resLength = (result).val().trim().length;
              alert(resLength);
              if(resLength!=0)
              {
  
                  var arr = result.split(",");
                  var fname = arr[0];
                  var lname = arr[1];
                  var activeCardNo = arr[2];
                  var multipleTier = arr[3];
                  var activeStatus = arr[4];
                  var access = arr[5];
              }
          }
      }); 
  </code></pre>
  
  <p>In Above code sample when I am trying to use <strong>.val()</strong> in below line </p>
  
  <pre><code>var resLength = (result).val().trim().length;
  </code></pre>
  
  <p>it is giving error <strong>"result.val is not a function"</strong>, If I am using just <strong>result.trim().length</strong> its working fine in firefox, however giving error in IE.</p>
  
  <p>Please suggest!</p>