What I’m trying to do is have a java window alert pop up if the PNR column is blank and the BOM column is not blank on each row. I also put a cold fusion If statement around this javascript that the CN_Entry column in the Items table has to be an “N”. This code all actually works, but it only works on the row with the latest or newest item with an “N” in the CN_Entry column. I would like this to work on every row, so that if someone does this on any row, or multiple rows, this alert box will keep popping up until all the conditions are satisfied. What do I need to change to make this javascript work? Thanks.
<cfif CN_Entry EQ "N">
<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
function verify() {
var themessage = "Please enter ";
if (EditItem.PNR_Approval_Initials#ItemID#.selectedIndex == 0 && EditItem.BOM_Approval_Initials#ItemID#.selectedIndex > 0)
{
alert("You must enter some PNR initials for ECO #ECID_SPEC# Part Number: #Part_Number#");
EditItem.PNR_Approval_Initials#ItemID#.focus();
return (false);
}
else
{
document.EditItem.submit();
}
}
// End -->
</script>
</cfif>
Andy
North America
Europe, Middle East and Africa
Asia Pacific