shovonbugs Posted October 20, 2013 Share Posted October 20, 2013 Hi, I want to send an automatic email using cronjob and the email body is HTML format, I've stored the body content into hidden textarea but using JQUERY when I send to controller and when model get the value of textarea the HTML tags are removed... content.tpl files (here the bodyContent value I get from textarea, that is ok but when I post the HTML tags are removed) ------------- $('#sendEmail').click(function() {var selected = $("input[type=radio][name=emaildelivery]:checked");var selectedValue = selected.val();var bodyContent = ($('#bodyContent').val()); $.ajax({ type: 'POST', async: true, cache: false, data : { ajax : 1, controller : 'AdminHome', token : '{token}', bodyContentSM: bodyContent, selectedValueSM: selectedValue, action : 'sendCategoryEmail' }, url: 'ajax-tab.php', dataType : 'JSON', success: function(msg) { if (msg) {var infos = msg.infos;alert("Next week's menu has been sent successfully.");} else { } }, error: function(msg, textStatus, errorThrown) { jAlert("TECHNICAL ERROR:"); } });}); ------------------- in the controller file, I get the bodyContent value without HTML tag $bodyContentSM = pSQL(Tools::getValue('bodyContentSM')); Please give me solution ASAP. Thanks Link to comment Share on other sites More sharing options...
Recommended Posts