hello everyone. I have been to several different places looking for help - and I just did get quite a bit of help over at sitepoint, however, I am still at a loss on how to make this happen;
what I am hoping to achieve is to have the rows in my html table change background colors based on a selection the user makes from a drop down in my form. I have a column in my database table called “status” and it is an integer. I have an array page that lists the different “status” selections;
$status = array(
the html page for this is setup like this;
<form id="add_multytask" action="#" method="POST" class="<?= $status[$task->$status] ?>">
and the code block in question is this one;
<div class="large-6 columns"> <label>Status </label> <select name="status"> <option>Select Status</option> <?php foreach($status as $key => $value) : ?> <option value="<?php echo $key; ?>"><?php echo $value; ?></option> <?php endforeach; ?> </select> </div>
my question is this - how can I make the html table row change color based on the “status” selected? when the user selects “unstatused” in the pop-up form and hits the submit button - I want the row the user is in to change to a grey color, and if they select “busy” then I need to have that row change its background color to “yellow” and if “available” is selected, then i need that row to be green.
I have tried everything that my limited knowledge will allow and am really hoping that someone can help me get this done?