Answered
I need to have a pop-up box appear if a word is entered into a field. The field does not have any current javascript. Is it possible for the script to be dormant if the word is not typed into the field?
I need to have a pop-up box appear if a word is entered into a field. The field does not have any current javascript. Is it possible for the script to be dormant if the word is not typed into the field?
// code to display an alert boxvar sMsg = "This is my message";var nWarn= 1; // warning iconvar nButton = 0; // OK buttonvar sMyTitle = "Message Title";app.alert({cMsg: sMsg, nIcon: nWarn, nType: nButton, sTitle: sMyTitle});
if(event.value.search(/holiday/i)>-1){app.alert("holiday hours are calculated automatically in peoplesoft do not enter holiday hours on this paysheet",1)}
I'm pretty sure that only runs if the user modifies that field.