1
私は単純なajax投稿をしていますが、何かが間違っています。ここに私のコードは次のとおりです。jquery ajaxの問題を解決する方法は?
Request URL:https://test.com/fileupload.php
Request Method:POST
Status Code:200 OK
が、応答データはありません、:
<div id="one_hundredContent"></div>
<a href="<?php echo $id; ?>" id="id"></a>
<a href="100" id="one_hundred"><div class="tab6_stats_under1">100</div></a>
とJS
$('#one_hundred').live("click", function() {
var votes = $("#one_hundred").attr("href");
var id = $("#id").attr("href");
var dataString = 'id=' + id+ '&votes=' + votes;
$.ajax({
type: "POST",
url: "https://test.com/fileupload.php",
dataType: dataString ,
success: function() {
$('#one_hundredContent').html('success');
}
});
return false;
});
とPHP
if(isset($_POST['id']) && isset($_POST['votes'])){
$tal = $_POST['id'];
$votes = $_POST['votes'];
echo $tal.' '. $votes;
die;
}
要求がOKに行きます変数が渡されたり、成功したことが私には分かりません。 ssage
何が不足しているかについてのアイデアはありますか?
おかげ
html
は、あなたがそれをfirebugginとXML要求を表示するには、コンソールを設定しようとしています? – Rooster