Guest User

Untitled

a guest
Mar 13th, 2018
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.50 KB | None | 0 0
  1. <form method="post" action="">
  2. <textarea class="form-control" id="formem"><?php echo $hd['hd_membenifits']; ?></textarea>
  3. <textarea class="form-control" id="foradv"><?php echo $hd['hd_advbenifits']; ?></textarea>
  4. </form>
  5.  
  6. <script type="text/javascript">
  7. $(document).ready(function() {
  8. $("#submit").click(function() {
  9. var dataString = {
  10. formem: $('#formem').val(),
  11. foradv: $('#foradv').val(),
  12. type: 'homeData'
  13. };
  14. console.log(dataString);
  15. var $submit = $(this).parent().find('#submit');
  16. $.confirm({
  17. title: 'Confirm!',
  18. content: 'Are you sure you want to delete this banner?',
  19. buttons: {
  20. confirm: function () {
  21. $.ajax({
  22. type: "POST",
  23. //dataType : "json",
  24. url: "cms-process.php",
  25. data: dataString,
  26. cache: true,
  27. beforeSend: function(){
  28. $submit.val("Please wait...");
  29. },
  30. success: function(html){
  31. $.alert(html);
  32. $submit.val("Update Content");
  33. }
  34. });
  35. },
  36. cancel: function(){}
  37. }
  38. });
  39. return false;
  40. });
  41. </script>
  42.  
  43. <script src="js/tinymce/tinymce.min.js"></script>
  44. <script>
  45. tinymce.init({
  46. selector:'textarea',
  47. height : "300",
  48. plugins: "textcolor",
  49. toolbar: "undo redo | bold italic underline justify | styleselect | forecolor backcolor | alignleft aligncenter alignright alignjustify",
  50. textcolor_cols: "10"
  51. });
  52. </script>
Add Comment
Please, Sign In to add comment