after ajax form submit value from ckeditor textarea is not sent through post

后端 未结 5 1966
鱼传尺愫
鱼传尺愫 2021-02-08 07:30

i have a form having some textfields and a textarea (ckeditor), after onclick button art_title field value is sent to art_save.php page, but value from textarea is not sent.

5条回答
  •  别跟我提以往
    2021-02-08 08:05

    for (instance in CKEDITOR.instances) 
    {
        CKEDITOR.instances[instance].updateElement();
    }
    
    $.ajax({
        url: "controllers/c.publicidad.php?task=save",
        type: 'post',
        data: $("form[name='form']").serialize(),
        dataType: 'json',
        success: function(data) {
            if(data.idenvio != ''){
                $("form[name='frmPublicidad']").toggle("slow");
                $("#MessageSuscripcion").html(data.message);
            }
        }
    });
    

提交回复
热议问题