I've inherited a project and I'm currently fixing some bugs. There's a snippet of JavaScript that is supposed to highlight certain boxes and prompt a confirmation box. However, what actually happens is the boxes change color, there's a delay of about 5 seconds, and then it seems like the missing confirm dialog just accepts itself. Can anyone more knowledgeable than me spot any issues in this code?
function lastCheckInv() {
document.getElementById("ctl00$ContentPlaceHolderMain$INDet$txtInvNumber").style.background = "yellow";
document.getElementById("ctl00$ContentPlaceHolderMain$INDet$txtInvNumber").focus();
document.getElementById("ctl00_ContentPlaceHolderMain_INDet_AddCharges").style.background = "yellow";
document.getElementById("ctl00_ContentPlaceHolderMain_INDet_lblFreight").style.background = "yellow";
bRetVal = confirm("Are you sure the information associated with this invoice is correct?");
return bRetVal;
}