$( 'textarea.editor' ).ckeditor({ on: { change: function( evt ) { var name = this.name; var textarea = $('textarea[id="'+name+'"]'); textarea.trigger( "change" ); } } }); There is a textarea with a change event and a ckeditor is hung on it. After an event, for some reason, the value is not as it should be, and the code:
textarea.change(function() { var value = $(this).val(); $.ajax({ type: "POST", url: "edit.php", data: 'value='+value, success: function(msg){ } }); }); Does not transmit the correct value. Transmits only one line, i.e. in the debugger instead of
value:
Protection Kit, Blue / White
Transmitted
value =
Protection Kit, Blue / White
data: 'value='+value. Where to take colons? And what kind of bike do you invent? Since you are using jQuery, pass the JavaScript object to thedataparameter, which itself is then serialized as it should, or generate the body of the POST request yourself using the.serialize()method. - neluzhin