I'm having some difficulties getting Javascript to execute in a PHP statement if it is possible at all. Below I have the code, if the field 'First'
is empty, then the background color of a certain div will be yellow. How can I get this to work properly if it is possible in the first place? Thanks in advance.
if (empty($_POST["First"])) {
echo '<script type="text/javascript">';
echo '$("div").css({"background-color":"yellow"});';
echo '</script>';
}