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 Feature

3 posters

Go down

Solved Auto Save Feature

Post by udarsha45 May 6th 2014, 3:17 pm

Hello,

I've just read this tutorial and added it to my https://help.forumotion.com/t132804-automatically-save-posts-in-progress I have to say, it works perfectly! However is their a way to show that the post you were typing were saved? I mean after you type 5 words or so, an icon or a message pop ups and tells that our post is saved?


Last edited by udarsha45 on May 11th 2014, 7:48 am; edited 1 time in total
udarsha45
udarsha45
Forumember

Male Posts : 626
Reputation : 9
Language : English
Location : Sri Lanka

http://bleach.5forum.net

Back to top Go down

Solved Re: Auto Save Feature

Post by udarsha45 May 7th 2014, 4:30 pm

Bump.
udarsha45
udarsha45
Forumember

Male Posts : 626
Reputation : 9
Language : English
Location : Sri Lanka

http://bleach.5forum.net

Back to top Go down

Solved Re: Auto Save Feature

Post by udarsha45 May 8th 2014, 5:48 pm

Bumping.
udarsha45
udarsha45
Forumember

Male Posts : 626
Reputation : 9
Language : English
Location : Sri Lanka

http://bleach.5forum.net

Back to top Go down

Solved Re: Auto Save Feature

Post by udarsha45 May 10th 2014, 5:33 pm

bump.
udarsha45
udarsha45
Forumember

Male Posts : 626
Reputation : 9
Language : English
Location : Sri Lanka

http://bleach.5forum.net

Back to top Go down

Solved Re: Auto Save Feature

Post by Niko May 10th 2014, 6:42 pm

Hello,

I'm happy that you enjoyed my resource Wink

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");
            }
          });
      }
    })});
Niko
Niko
Helper
Helper

Male Posts : 3100
Reputation : 244
Language : English, Italian, French
Location : Italy

https://www.fmcodes.net/

Back to top Go down

Solved Re: Auto Save Feature

Post by udarsha45 May 11th 2014, 7:47 am

Thanks alot mate! Very Happy
udarsha45
udarsha45
Forumember

Male Posts : 626
Reputation : 9
Language : English
Location : Sri Lanka

http://bleach.5forum.net

Back to top Go down

Solved Re: Auto Save Feature

Post by Niko May 11th 2014, 11:15 pm

Nothing Wink

Have a nice day :rose:
Niko
Niko
Helper
Helper

Male Posts : 3100
Reputation : 244
Language : English, Italian, French
Location : Italy

https://www.fmcodes.net/

Back to top Go down

Solved Re: Auto Save Feature

Post by SLGray May 12th 2014, 1:11 am

Topic Solved & Archived


Auto Save Feature Slgray10

When your topic has been solved, ensure you mark the topic solved.
Never post your email in public.
SLGray
SLGray
Administrator
Administrator

Male Posts : 51463
Reputation : 3519
Language : English
Location : United States

https://forumsclub.com/gc/128-link-directory/

Back to top Go down

Back to top


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