English 中文(简体)
员额职能
原标题:Jquery post function not working
  • 时间:2012-01-13 01:21:30
  •  标签:
  • jquery

我有这个格奇员额,它从一个文本处理处获得文本,并投入一个我的ql数据库,然后改变一个零件价值。 所有这一切都是在一顿被点击时进行的。 j格功能是:

 $( #editAnswerSubmit ).click(function(e){  //the button 
    e.preventDefault();

        var edited_answer = $( #modalEditAnswer ).val();

        $.post( ../submiteditanswer.php  , {edited_answer: edited_answer , answer_id: answer_id} , function(response){

                answer.val(response);
                $( #editAnswerModal ).modal( hide );
        });
});

我有<代码>alert()所有变量,如果点子被点击,正确的数值似乎就与后代码本身不符。 在职位之后,但在第一次答复之前,我也有一个<代码>alert(测试),从未出现过。

提交材料:

<?php
include  connect.php ;
$answerID=$_POST[ answer_id ];
$sql=mysql_query("UPDATE answers SET time= 2  WHERE id= $answerID ");
$edited_answer=mysql_real_escape_string($_POST[ edited_answer ]);
$time=time();

$sql=mysql_query("UPDATE answers SET time= $time  , answer= $edited_answer  WHERE id= $answerID ");
echo $edited_answer;
?> 
最佳回答

机会是:不能找到<条码>提交门槛值。

这条路应当与<代码>/相对。

如果有火药、幼.发育器、假肢和一米粗.的检查,那里将有大约404起错误。

如果你们需要帮助找到哪一条使用的道路,那么,我们大家都知道,submiteditanswer.php坐在你的名录结构中。

问题回答

暂无回答




相关问题
getGridParam is not a function

The HTML: <a href="javascript:void(0)" id="m1">Get Selected id s</a> The Function: jQuery("#m1").click( function() { var s; s = jQuery("#list4").getGridParam( selarrrow )...

selected text in iframe

How to get a selected text inside a iframe. I my page i m having a iframe which is editable true. So how can i get the selected text in that iframe.

jQuery cycle page with links

I am using the cycle plugin with pager functionality like this : $j( #homebox ) .cycle({ fx: fade , speed: fast , timeout: 9000, pager: #home-thumbs , ...

jquery ui dialog opens only once

I have a button that opens a dialog when clicked. The dialog displays a div that was hidden After I close the dialog by clicking the X icon, the dialog can t be opened again.

jConfirm with this existing code

I need help to use jConfirm with this existing code (php & Jquery & jAlert). function logout() { if (confirm("Do you really want to logout?")) window.location.href = "logout.php"; } ...

Wrap text after particular symbol with jQuery

What I m trying to do, is wrap text into div inside ll tag. It wouldn t be a problem, but I need to wrap text that appears particularly after "-" (minus) including "minus" itself. This is my html: &...

热门标签