I am trying to refresh the page after 3 seconds if two text boxes are not filled with text.
I have it set to a button, it works fine without the conditions.
function refresh() {
var txt1 = document.getElementById("txtAccountNumber");
var txt2 = document.getElementById("txtStaffNumber");
if (txt1.value == "" && txt2.value == "") {
setTimeout(function() {
location.reload();
}, 3000);
}
}