The forum of the forums
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Auto Save Post Script not working

2 posters

Go down

In progress Auto Save Post Script not working

Post by prescott50 June 6th 2015, 5:37 pm

The script is no longer saving post in progress
avatar
prescott50
Forumember

Posts : 58
Reputation : 0
Language : english
Location : United States

http://thecleanerslounge.forumotion.com

Back to top Go down

In progress Re: Auto Save Post Script not working

Post by Ape June 6th 2015, 6:30 pm

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.


Auto Save Post Script not working Left1212Auto Save Post Script not working Center11Auto Save Post Script not working Right112
Auto Save Post Script not working Ape_b110
Auto Save Post Script not working Ape1010
Ape
Ape
Administrator
Administrator

Male Posts : 19084
Reputation : 1988
Language : fluent in dork / mumbojumbo & English haha

http://chatworld.forumotion.co.uk/

Back to top Go down

In progress Re: Auto Save Post Script not working

Post by prescott50 June 6th 2015, 8:30 pm

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");
            }
          });
      }
    })});
avatar
prescott50
Forumember

Posts : 58
Reputation : 0
Language : english
Location : United States

http://thecleanerslounge.forumotion.com

Back to top Go down

In progress Re: Auto Save Post Script not working

Post by Ape June 7th 2015, 2:30 am

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.


Auto Save Post Script not working Left1212Auto Save Post Script not working Center11Auto Save Post Script not working Right112
Auto Save Post Script not working Ape_b110
Auto Save Post Script not working Ape1010
Ape
Ape
Administrator
Administrator

Male Posts : 19084
Reputation : 1988
Language : fluent in dork / mumbojumbo & English haha

http://chatworld.forumotion.co.uk/

Back to top Go down

In progress Re: Auto Save Post Script not working

Post by prescott50 June 9th 2015, 4:48 pm

Thanks APE. The Quick Reply is not auto saving for me.
avatar
prescott50
Forumember

Posts : 58
Reputation : 0
Language : english
Location : United States

http://thecleanerslounge.forumotion.com

Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum