Hi,
Using APEX 4.2 (Oracle, 10 anf 11g)
I have a page and want to validate the items when click SUBMIT button using Javascript.
eg. I have a page 10. P10_item1, P10_item2, P10_item3 so on. button name is SUBMIT .
Dynamic action: When click -> Button -> action -> execute Javascript code
if ($x('P10_item1').value == '' || $x('P10_item2').value == '' || $x('P10_item3').value == '') {
alert('Mandatory fields can be left blank');
}
else {
apex.submit('SUBMIT');
}
ALL WORK fine above, however I want to add background-color change (field) if any above field is blank after
click submit. I have added these onto the page CSS
.highlight-error
{
background-color: #FAE7E7 !important;
color: white;
}
so how can I use this css in my javascript code after alert message please?
Many thanks.
Regards,
RI