The script is no longer saving post in progress
2 posters
Auto Save Post Script not working
prescott50- Forumember
- Posts : 58
Reputation : 0
Language : english
Location : United States
- Post n°1
Auto Save Post Script not working
Ape- Administrator
- Posts : 19432
Reputation : 2010
Language : fluent in dork / mumbojumbo & English haha
- Post n°2
Re: Auto Save Post Script not working
prescott50 wrote:The script is no longer saving post in progress
Please give us the place you got the code from and the code you have so we can test it.
Note some codes are not hosted by us and there for we may not have the right to edit the codes if it has a copyright on it.
prescott50- Forumember
- Posts : 58
Reputation : 0
Language : english
Location : United States
- Post n°3
Re: Auto Save Post Script not working
Here's the code
$(function(){$(function(){
     var saved = 1;
Â
   if($("#text_editor_textarea").length != 0){
         $("input[type='submit'][name='post']").attr("disabled", true).css("opacity", "0.5");   Â
         $(".sceditor-container").after("<br/><div id='div_minchars_info'></div></div>");
       Â
         var sceditor = $("#text_editor_textarea").sceditor("instance");               Â
         var str = sceditor.val();
         var regex = new RegExp('\\w{' + saved + ',}\\b', 'g');
         var str_arr = str.match(regex);
         var str_len = str_arr == null ? 0 : str_arr.length;
       Â
         if(str_len >= 1) $("input[type='submit'][name='post']").attr("disabled", false).css("opacity", "1");
       Â
         sceditor.keyUp(function(e) {
           str = sceditor.val();
           str_arr = str.match(regex);
           str_len = str_arr == null ? 0 : str_arr.length;
           if(str_len >= 1) {
               $("#div_minchars_info").html("Message saved");
           $("input[type='submit'][name='post']").attr("disabled", false).css("opacity", "1");
           }else{
               $("#div_minchars_info").html("Message not saved");
               $("input[type='submit'][name='post']").attr("disabled", true).css("opacity", "0.5");
           }
         });
     }
   })});
$(function(){$(function(){
     var saved = 1;
Â
   if($("#text_editor_textarea").length != 0){
         $("input[type='submit'][name='post']").attr("disabled", true).css("opacity", "0.5");   Â
         $(".sceditor-container").after("<br/><div id='div_minchars_info'></div></div>");
       Â
         var sceditor = $("#text_editor_textarea").sceditor("instance");               Â
         var str = sceditor.val();
         var regex = new RegExp('\\w{' + saved + ',}\\b', 'g');
         var str_arr = str.match(regex);
         var str_len = str_arr == null ? 0 : str_arr.length;
       Â
         if(str_len >= 1) $("input[type='submit'][name='post']").attr("disabled", false).css("opacity", "1");
       Â
         sceditor.keyUp(function(e) {
           str = sceditor.val();
           str_arr = str.match(regex);
           str_len = str_arr == null ? 0 : str_arr.length;
           if(str_len >= 1) {
               $("#div_minchars_info").html("Message saved");
           $("input[type='submit'][name='post']").attr("disabled", false).css("opacity", "1");
           }else{
               $("#div_minchars_info").html("Message not saved");
               $("input[type='submit'][name='post']").attr("disabled", true).css("opacity", "0.5");
           }
         });
     }
   })});
Ape- Administrator
- Posts : 19432
Reputation : 2010
Language : fluent in dork / mumbojumbo & English haha
- Post n°4
Re: Auto Save Post Script not working
your code is working for me on my site but only on the Quick Reply box you will need to turn some of your codes off and then try again.
prescott50- Forumember
- Posts : 58
Reputation : 0
Language : english
Location : United States
- Post n°5
Re: Auto Save Post Script not working
Thanks APE. The Quick Reply is not auto saving for me.