jQuery Kind of Working :/

Hi all, I have a slight problem with my AJAX, it’s kind of working in that it seems to be connection to my PHP file and updating but the problem seems to be in the return of the data as I just get the alert PROBLEM. If I refresh the page the new content is in place. It’s just not coming out through AJAX for some reason :confused: Any help would be appreciated :slight_smile:

<script>

    function ajaxUpdate(help){

        if(help !==""){
            jQuery.ajax({
               type: "POST",
               dataType: "json",
               url: "/includes/ajax_basket_updates.php",
               data: help,
               success: function(data){
                   jQuery('#basketTable').html(data.cart);
               },
               error: function(){
                   alert('PROBLEM!');
               }
            });
        }

    }

    jQuery(document).ready(function() {
        //If user updates hire period...
        jQuery('#pricingSelect').change(function(){
            var selected = jQuery('#pricingSelect option:selected').val();
            ajaxUpdate('period='+selected);
        });
    });
</script>

I suggest you look at your develooppers tools (or firebug,…) network tab to see what the PHP returns.

and check the value of “help”