Auto Save Feature
3 posters
Page 1 of 1
Auto Save Feature
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?
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
Re: Auto Save Feature
Hello,
I'm happy that you enjoyed my resource
I'm happy that you enjoyed my resource
- 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");
}
});
}
})});
Re: Auto Save Feature
Topic Solved & Archived
Lost Founder's Password |Forum's Utilities |Report a Forum |General Rules |FAQ |Tricks & Tips
You need one post to send a PM.
You need one post to send a PM.
When your topic has been solved, ensure you mark the topic solved.
Never post your email in public.
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum