Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <form method="post" action="">
- <textarea class="form-control" id="formem"><?php echo $hd['hd_membenifits']; ?></textarea>
- <textarea class="form-control" id="foradv"><?php echo $hd['hd_advbenifits']; ?></textarea>
- </form>
- <script type="text/javascript">
- $(document).ready(function() {
- $("#submit").click(function() {
- var dataString = {
- formem: $('#formem').val(),
- foradv: $('#foradv').val(),
- type: 'homeData'
- };
- console.log(dataString);
- var $submit = $(this).parent().find('#submit');
- $.confirm({
- title: 'Confirm!',
- content: 'Are you sure you want to delete this banner?',
- buttons: {
- confirm: function () {
- $.ajax({
- type: "POST",
- //dataType : "json",
- url: "cms-process.php",
- data: dataString,
- cache: true,
- beforeSend: function(){
- $submit.val("Please wait...");
- },
- success: function(html){
- $.alert(html);
- $submit.val("Update Content");
- }
- });
- },
- cancel: function(){}
- }
- });
- return false;
- });
- </script>
- <script src="js/tinymce/tinymce.min.js"></script>
- <script>
- tinymce.init({
- selector:'textarea',
- height : "300",
- plugins: "textcolor",
- toolbar: "undo redo | bold italic underline justify | styleselect | forecolor backcolor | alignleft aligncenter alignright alignjustify",
- textcolor_cols: "10"
- });
- </script>
Add Comment
Please, Sign In to add comment