Still cant find a solution... about ajax call

Posted by booota on Stack Overflow See other posts from Stack Overflow or by booota
Published on 2010-06-08T04:44:19Z Indexed on 2010/06/08 4:52 UTC
Read the original article Hit count: 224

Filed under:
|

Okay I have this ajax call

$('.updatecom .registercomplaint').click(function(){
    updatecomplaints();
});

This calls the function updatecomplaints()

function updatecomplaints()
{
var tno = $(".updatecom #tno").val();
var status = $(".updatecom #status").val();
if(status=='DONE')
{
    $(".updatecom #con").val('');
}
var tname = $(".updatecom #tname").val();
var rg11 = $(".updatecom #crg11").val();
var rg06 = $(".updatecom #crg06").val();
var tvpins = $(".updatecom #tvpins").val();
var jointer = $(".updatecom #jointer").val();
var cquantity = $(".updatecom #conqty").val();
var nooftv = $(".updatecom #tvno").val();
var misc = $(".updatecom #misc").val();
var tcomments = $(".updatecom #tcomments").val();
var con = $(".updatecom #con").val();
//alert(tno+status+tname+rg11+rg06+tvpins+jointer+cquantity+nooftv+misc+tcomments+con);
$.ajax(
{
    type: "POST",
    url: "up_functions.php",
    data: "ticket="+ tno +"& opt=upcom" +"& status="+ status +"& tname="+ tname +"& rg11="+ rg11 +"& rg06="+ rg06 +"& tvpins="+ tvpins +"& jointer="+ jointer +"& cquantity="+ cquantity +"& nooftv="+ nooftv +"& misc="+ misc +"& tcomments="+ tcomments +"& con="+ con,
    success: function(response)
    {
        alert(response);

    }
});

}

here is my up_functions.php

$tno = htmlspecialchars(trim($_REQUEST['ticket']));
        $status = htmlspecialchars(trim($_REQUEST['status']));
        $tname = htmlspecialchars(trim($_REQUEST['tname']));
        $rg11 = htmlspecialchars(trim($_REQUEST['rg11']));
        $rg06 = htmlspecialchars(trim($_REQUEST['rg06']));
        $tvpins = htmlspecialchars(trim($_REQUEST['tvpins']));
        $jointer = htmlspecialchars(trim($_REQUEST['jointer']));
        $cquantity = htmlspecialchars(trim($_REQUEST['cquantity']));
        $nooftv = htmlspecialchars(trim($_REQUEST['nooftv']));
        $misc = htmlspecialchars(trim($_REQUEST['misc']));
        $tcomments = htmlspecialchars(trim($_REQUEST['tcomments']));
        $con = htmlspecialchars(trim($_REQUEST['con']));
        $result=$ptr->upcomticketinfo($tno,$status,$tname,$rg11,$rg06,$tvpins,$jointer,$cquantity,$nooftv,$misc,$tcomments,$con);
        echo $result;

and here is my upconticketinfo() php function

function upcomticketinfo($tno,$status,$tname,$rg11,$rg06,$tvpins,$jointer,$cquantity,$nooftv,$misc,$tcomments,$con)
{
    if($con!='' || $con!=NULL)
    {
        $this->query = "update `booking discription` set `STATUS`='$status',`CLOSED ON`='$con' where `TICKET NO`='$tno'"; 
        $this->q_result = mysql_query($this->query,$this->conn) or die(mysql_error());
        if($this->q_result)
        {
            $query = "update `tech detail` set `TECH NAME`='$tname',`CABLE RG11`='$rg11',`CABLE RG06`='$rg06',`TV PINS USED`='$tvpins',`JOINTER USED`='$jointer',`CONNECTOR QTY`='$cquantity',`NO OF TV`='$nooftv',`MISC`='$misc',`TECH COMMENTS`='$tcomments' where `BOOKING`='$tno'"; 
            $q_result = mysql_query($query,$this->conn) or die(mysql_error());
            if($q_result)
            {
                $response = "updated";
            }
            else
            {
                $response = "error";
            }
        }
        else
        {
            $response = "error";
        }
    }
    else
    {
        $this->query = "update `booking discription` set `STATUS`='$status' where `TICKET NO`='$tno'"; 
        $this->q_result = mysql_query($this->query,$this->conn) or die(mysql_error());
        if($this->q_result)
        {
            $query = "update `tech detail` set `TECH NAME`='$tname',`CABLE RG11`='$rg11',`CABLE RG06`='$rg06',`TV PINS USED`='$tvpins',`JOINTER USED`='$jointer',`CONNECTOR QTY`='$cquantity',`NO OF TV`='$nooftv',`MISC`='$misc',`TECH COMMENTS`='$tcomments' where `BOOKING`='$tno'"; 
            $q_result = mysql_query($query,$this->conn) or die(mysql_error());
            if($q_result)
            {
                $response = "updated";
            }
            else
            {
                $response = "error";
            }
        }
        else
        {
            $response = "error";
        }
    }
    return $response;
}

Question is that, this code is working just fine in IE8 i.e i am using... but it is not working in FF 3.6.3... I have checked each n everything... One thing is that the code works fine on FF too only when i debug the page with firebug debugger. Otherwise the alert in ajax success shows itself with nothing in it... Help me...

© Stack Overflow or respective owner

Related posts about jQuery

Related posts about AJAX