var lookFor = /Invalid username or password/gi; // Case-Insensitive RegExvar msgText = document.getElementById("_msgTxt"); // maybe it is msgDiv instead?//if (msgText != null && typeof(msgText) != "undefined"){ var msgTextVal = msgText.value; // if it is msgDiv, change to innerText var foundIt = lookFor.test(msgTextVal); // if (foundIt == true) { var feedBack = "Invalid UserName or Password. " + "Please note that a password change may take 5 minutes " + "before it is effective"; // alert(feedBack); // Note you could change the text on the webpage too... msgText.value = feedBack; // if it is msgDiv, change to innerText }}
Good luck! Craig