Hello to everyone. I’m developing a module for my website, but I have a problem with ajax. This is the javascript, activated by a “onclick” event on anchor. This is the JS code on the view file:
function takeordering(){
var order = $("#sortable2").sortable("serialize");
$.ajax({
type: "GET",
dataType: "json",
url: "<? echo BASE . $form_action; ?>",
data: order,
success: function(data){
if(data.response =='true'){
alert(data.message); //change alert to updated DOM somewhere
}
error: function(){
alert('Something major failed');
}
}
})
};
$(document).ready(function(){
$(function() {
$("#list_original, #list_sorted").sortable({
cursor: 'move',
connectWith: ".list_key"
});
});
});Attached params and response (from firebug). Note “Disallowed key characters”.
This is the code my mcp file (made to test ajax).
$vars['ajax'] = 'test_message';
return $this->EE->output->send_ajax_response($vars);Does anyone know how to make this work?
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.