There is a function ajax request and div. I need to click on the button with html with a diva inserted into the textarea and send ajax, how to do it? Now it inserts, but does not send anything. And if you write it down in the text itself, it will send
$('.story-publisher-box form').ajaxForm({ url: SK_source() + '?t=post&a=new', beforeSend: function() { var mesA = $('.KEmoji_Input div').html(); mesA = mesA.replace("<", "<"); mesA = mesA.replace(">", ">"); $('.auto-grow-input').val(mesA); main_wrapper = $('.story-publisher-box'); textarea = main_wrapper.find('textarea'); inputs = main_wrapper.find('input[type="text"]'); button = main_wrapper.find('button.submit-btn'); button_default_text = button.find('span').text(); textarea.attr('disabled', true); inputs.attr('disabled', true); button.attr('disabled', true); SK_progressIconLoader(button); }, uploadProgress: function(event, position, total, percentComplete) { button .find('span').text(percentComplete + '%'); if (percentComplete == 100) { button .find('span').text('@processing@'); } }, success: function(responseText) { if (responseText.status == 200) { $('.stories-wrapper').prepend(responseText.html); } //$('.story-publisher-box form').resetForm(); main_wrapper .find('.story-text-input') .val('') .end().find('.result-container') .remove() .end().find('.input-wrapper') .find('.result-container') .remove() .end() .find('.input-result-wrapper') .empty() .end().find('input') .show() .val('') .end().find('.remove-btn') .remove() .end().find('.youtube-link') .remove() .end().slideUp(); textarea.removeAttr('disabled'); inputs.removeAttr('disabled'); button .removeAttr('disabled') .find('span').text(button_default_text); SK_progressIconLoader(button); } });
valuetext field, so probably it doesn’t send anything. - Klimenkomudbuttonbecomesdisabledbefore sending a request. Maybe this is the problem? - Klimenkomud