We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

Ajax in the cp: Disallowed key characters

Development and Programming

milogdm's avatar
milogdm
4 posts
14 years ago
milogdm's avatar milogdm

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?

       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.