I am trying to get a query to run to update the status of the system whenever the radio button is selected without having to use submit buttons, but for some reason I cannot get it to work right, here is what I have so far but it isn't working, I need someone to push me in the right direction on this, thanks
<script language="javascript">
function update(sys_status, my_system){
$.post("updateStatus.php",
{ status: "sys_status", system: "my_system" }, function(data){alert("Data Loaded: " + sys_status); });
}
</script>
<li style='line-height: 150%'> <form method="post" action="<?php echo $_SERVER['PHP_SELF'] ?>" id="status">
<label title="Set Status" for="setStatus" accesskey="p">Set Status: </label>
<input type="radio" name="status" id="status" value="w" onclick="update('w', <?php echo $strHW_Asset;?>)"/>In Use
<input type="radio" name="status" id="status" value="i" onclick="update('i', <?php echo $strHW_Asset;?>)"/>Inactive
<input type="radio" name="status" id="status" value="n" onclick="update('n', <?php echo $strHW_Asset;?>)"/>Destroyed
<input type="hidden" name="statusID" value="true" />
</form>