JSFiddle - React, Tailwind, and code Playground
by Praveen Kumar Purushothaman
HTML
<select name="active" class="button_select" id="active" style="width:150px" >
<option id="on" value="on">Online</option>
<option id="off" value="" <?php if($rows['active']=='') { echo 'selected'; } elseif ($rows['active']=='on' && $rows['images'] == 0) { echo 'selected'; } ?>>Offline</option>
<option id="arch" value="arch" <?php if($rows['active']=='arch') { echo 'selected'; } ?>>Archived</option>
</select>
JavaScript
$(document).ready(function()
{
$("#active").change(function()
{
var id = $(this).find("option:selected").attr("id");
switch(id)
{
case "on":
$("body").append('<a href="select.php"><img src="../images/icons/coquette/48x48/accept.png" alt="" border="0" /></a>');
break;
}
});
});