I am using JQuery and I have got below JQuery Code sample.
JQuery 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];
}
}
});
In Above code sample when I am trying to use .val() in below line
var resLength = (result).val().trim().length;
it is giving error "result.val is not a function", If I am using just result.trim().length its working fine in firefox, however giving error in IE.
Please suggest!