I have difficulties sending through post variables using the JQuery Ajax function, when changing type to GET is all works.
CODE
function loadAttributes() {
            var selectedValues = [];    
            var presentValues = [];    
            $('#attrplaceholder div').each(function(){
                if (typeof $(this).data('attrid') !== 'undefined')
                {
                    presentValues.push($(this).data('attrid'));
                } 
             });
            $("#categories :selected").each(function(){
                   selectedValues.push($(this).val()); 
            });
            jQuery.ajax({
               url: 'backend.php?r=products/setProductAttributes',
               type: "POST",
               dataType:"html",
                contentType: 'text/html; charset=utf-8',
               data: {ids: selectedValues,presentids: presentValues},
               success: function(json){
alert(json)
                        if(json!='[]'){
                            var obj = eval ("(" + json + ")"); 
                            if(obj.json !== 'undefined'){
                                    $.each(obj.json, function(k, v) {
                                        if(k==='views'){
                                            $("#attrplaceholder").append(v);
                                        }
                                        if(k==='rem'){
                                            var remvals = v.toString().split(",");
                                            for(i=0;i<remvals.length;i++){
                                                $("#attrgrp_"+remvals[i]).remove();
                                            }
                                        }
                                    });
                            }
                        }
               }
               });
            return false;
         }
        loadAttributes() 
        $("#categories").on("change",function(){
            loadAttributes() 
        });
Any pointers will be helpful, I tried to play with the contentTypes and still no luck
 
     
    