Tried to get this to work:
var instance_name = $('#instance_name').val();
$("#instance_name").on("blur", function(e){
if (!~$.inArray(instance_name, not_allowed)) {
$("#instance_alert").html("<font color=green>Instance does not exists. Please continue</font>");
} else {
$("#instance_alert").html("<font color=red>Instance exists. Please try another one.</font>");
}
But to no avail.. (Looked into How to check if a value is NOT in an array using jQuery)
Any ideas why it still continues to say Please continue Kindly.