jQuery(function ($) {
/* fetch elements and stop form event */
$("form.follow-form").submit(function (e) {
/* stop event */
e.preventDefault();
/* "on request" */
$(this).find('i').addClass('active');
/* send ajax request */
$.post('recycle.php', {
followID: $(this).find('input').val()
}, function() {
/* find and hide button, create element */
$(e.currentTarget)
.find('button').hide()
.after('Following!');
});
});
});
recyle
reycle.php:
include_once ('includes/connect.php');
$id = $_POST['id'];
$tweet =$_POST['tweet'];
$registerlistener = mysql_query("INSERT INTO notes (user_id, user_note,recyle_id,dt) VALUES('".$_SESSION['user_id']."','".$tweet."','".$id."',NOW()");
?>
的问题是,它不是访问recycle.php文件,插入HTML表单的信息到数据库!但它正在做整个jQuery动画!我没有看到最新的问题!
2010-09-17
getaway
+0
什么是“整个jQuery动画”? –
2010-09-17 17:02:40
+0
基本上当我点击reycle按钮时,它变成了文字说“回收” –
2010-09-17 17:04:05
+0
该值'=“$ id”'不是'value =“”',并且与$ tweet相同' –
2010-09-17 17:36:16