I have a textarea with ckeditor plugins. before, I have no problems using it and the data can be stored properly. but now I get the error "POST" ... path/url ... net :: ERR_CONNECTION_RESET. when I try to enter the process of running a good bit of text. but when I enter a long text and included with some of the code, the error appears. peroses storage I did as follows. p_post.php (form) -> p_post.js (validate) -> f_post.php (insert function).
The following is a script p_post.js
jQuery(function($) {
var val_holder;
$("form input[name='btnsubmit']").click(function() { // triggred click
val_holder = 0;
var txtjudul = jQuery.trim($("form input[name='txtjudul']").val()); // email field
if(txtjudul == "") {
$("span.txtjudul_val").html("Judul tidak boleh kosong.");
val_holder = 1;
}
if(val_holder == 1) {
return false;
}
val_holder = 0;
$("span.validation").html("");
var datastring = $('#mainform');
datastring.on('submit', function(e) {
e.preventDefault();
$.ajax({
url: 'http://example.com/fungsi/f_post.php',
type: 'POST',
dataType: 'html',
data: datastring.serialize(),
beforeSend: function() {
},
success: function(e) {
if(e == 1) {
$("span.txtalert_val").html("Judul, Isi & Tags tidak boleh kosong!!");
} else {
if(e == 3) {
$("form input[type='text']").val('');
setTimeout(function(){
document.location.reload();
},1000);
datastring.trigger('reset');
}
}
}
});
});
});
});
and no problem with insert function.
Those kind of errors are generally generated in the server. You should check for errors in your server.
If you are using Windows
with Apache
, Event Viewer Application Log is a good start to gather more info
In *nix
you should check your web server log.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With