제출할 때 새로 고침하지 않는 양식이 있습니다. 내가 부분적으로 작동하지만 게시물 데이터가 작동하지 않는 부분을 볼 수 있습니다. 사람이 나처럼 데이터를 게시하려면이 양식을 해결하는 데 도움을 줄 수 있습니다 그것을해야새로 고침하지 않고 양식 제출 Jquery 문제
코드 : 잘 작동 코드 아래
<script>
$(function(){
$("#submit_status").click(function(){
var status=$("#Status").val();
//
$.post("edit_status.php",{"Status":status,"client_id":<? echo $client_id ?>},function(){
});
});
})
</script>
<form name="statusF" id="statusF" method="post" action="edit_status.php" enctype="multipart/form-data">
<input type="text" id="client_id" name="client_id" style="display: none;" value="<? echo $client_id ?>" />
<table width="100%" border="0">
<tr>
<td>Status</td>
<td>
<?
if ($status == "ACTIVE") {
$status_selectionA = "selected";
$status_selectionN = "";
}
else{
$status_selectionA = "";
$status_selectionN = "selected";
}
?>
<select name="Status" id="Status" style="background-color: rgba(110, 225, 253, 0.62);border: none;height: 50px;font-style: italic;width: 290px;padding: 10px;margin: 5px;color: #358fa7;font-size: 14pt;font-family: Neo Sans Light, Verdana, Tahoma;border: none;float: left;" class="required">
<option value="YES" title="YES" <? echo $status_selectionA; ?>>Active</option>
<option value="NO" title="NO" <? echo $status_selectionN; ?>>Not active</option>
</select>
</td>
<td><input type="submit" onclick="return false;" name="submit" style="display: none;" id="submit">
<label for="submit" class="add-client-button" style="margin:0;float: right;" id="submit_status">SAVE</label>
</td>
</tr>
</table>
</form>
작동하지 않습니다 무엇입니까? 콘솔에 오류가 있습니까? –
아니, 내가 페이지를 새로 고치면 데이터가 업데이트되지 않는다고 생각합니다. –
도와 드릴 수 있으면 좋겠지 만이 바이올린을 만들었습니다. http://jsfiddle.net/37sCF/ – pablofiumara