This code is an example of code that works in this application
var controlKL = "Knowledgelevel";
var Dave = $id("btnSave");
var getvalueKnowledgelevel;
// remember old save button behaviour
var oldClick = Dave[0].getAttribute("onclick");
// define new save button behaviour
var validaterecord = function()
{
// Get Current Screen Values
getvalueKnowledgelevel = $HRnet(controlKL).getDisplayValue();
// Do Validation
if ((getvalueKnowledgelevel == "" || getvalueKnowledgelevel == " "))
{ alert ("You may not Save a Qualification Record without first stating the Level of the Qualification")
return false;
}
else {oldClick();}
}
Dave[0].onclick = validaterecord;
|