views:

323

answers:

1

Hi, I've been pulling my hair out over this;

function status_update( token, loader ){
$("#status-submit").bind( 'click', function(){
    try{
        $("#status-feed-result").html( loader );
        $("#status-input").attr("disabled", "disabled");
        var status_input = $("#status-input").val();
        $.ajax({ 
            type: 'POST', url: './', data: 'token=' + token + '&refresh=true&status-input=' + status_input + '&aj=true', cache: false, timeout: 5000, datatype: 'json',
            error: function(){ $("#status-input").removeAttr('disabled'); }, 
            success: function(html){ 
                auth(html); 
                $("#status-input").removeAttr('disabled'); 
                $("#status-input").val(''); 
                var JSON = eval(html);

                alert(JSON.PROFILE_STATUS); 

                //$(".status-p").html( JSON.PROFILE_STATUS );
                //$(".time").html( JSON.PROFILE_STATUS_TIME );
            }                           
        });
    }catch(err){}
    return false;                                           
});
}

I keep getting an error invalid label, what does this mean and how can I prevent from happening. Any help much appreciated.

A: 

First thing I would check is, the JSON string I receive from the server.

Is it well-formated? -> json.org

Kind Regards

--Andy

jAndy
`{"PROFILE_STATUS":"dsdsd","PROFILE_STATUS_TIME":"09\/04\/2010 10:28"}`
Phil Jackson