When attempting to use the JQuery Ajax post function, I have exhausted all the options I could think of for it to work. I just need to post the data to a PHP handler and pass 2 variables. I confirmed the function is being called fine when I comment out the post code (alert is called), but as soon as I uncomment the line, nothing happens. I am using Firefox but have also tried it with Chrome as well.
<script type="text/javarscript">
function removeDatacenter( datacenter_id ) {
alert( datacenter_id );
$.ajax({
type: "POST",
url: "handler.php",
data: { action-type: 'remove_datacenter', id: '2' }
});
};
</script>