I'm relatively new to both apex and javascript, currently using apex 3.2.I have the javascript function
<script language="JavaScript" type="text/javascript">
function rankingChangeComment()
{
if ($v('P2_DEAN_AVP_RANK') > 3)
{
return alert("Since this program is ranked as a 4 or 5 you must provide an explanation");
}
else
{
return alert("no explanation needed");
}
}
</script>
in the html header. In the html form element for the item I have onsubmit="rankingChangeComment(this)"
and it does not work. If I change it to onchange="rankingChangeComment(this)" then as soon as I change the ranking the appropriate pop up alert shows but I want it to show after I click the submit button, not as soon as I change it. Any suggestions would be greatly appreciated.