I am working on a project which requires status update. I would like to add onlcick even on select box to show textarea only if the users selected the status as pending.
echo "
<select onchange=\"window.location=this.value\" name=\"status\">
<option value=\"".$res1['ProjStatus']."\">".$res1['ProjStatus']."</option>
<option value=\"completed\">Completed</option>
<option value=\"ongoing\">Ongoing</option>
<option value=\"Project.php?pending=pending\">Pending</option>
</select>
";
Question: I would like to show the textarea only if the user change the project status to pending.
The above code work but this refresh the whole page
onchange=\"window.location=..... Remove that and put something appropriate.