Wanting2LearnMan
asked on
lastIndexOf does not work in Internet Explorer
I have the following code:
But I find that the lastIndexOf does not work in InternetExplorer (It does in Chrome).
How can I fix this?
var currentServerlist = [];
var newServerIp = document.getElementById('add_server').value;
if( CurrentServerIP != newServerIp )
{
$('#failoverServers td.row_selector').each(function() {
var row = $(this).closest('tr');
var serverIp = row.find('td[rel=ip]').text();
currentServerlist.push(serverIp);
});
if(currentServerlist.lastIndexOf(newServerIp) != -1)
{
return true;
}
return false;
But I find that the lastIndexOf does not work in InternetExplorer (It does in Chrome).
How can I fix this?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.