wrong writting:

<script type="text/javascript">
function error(param1,param2){
$.post(url,{'param1':param1,'param2':param2,'param3':3},function(){},'json');
}
</script>

crrect wording:

<script type="text/javascript">
function error(param1,param2){
$.post(url,{'param1':param1,'param2':param2,'param3':'3'},function(){},'json');
}
</script>