Auto Save Post Script not working
2 posters
Page 1 of 1
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.
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");
}
});
}
})});
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.
Similar topics
» Auto Save Post In Progress
» Chatbox auto refresh not working.
» Posting Box Auto-Save Option
» Script to auto ban users without a certain email suffix?
» Script to auto ban users without a certain email suffix?
» Chatbox auto refresh not working.
» Posting Box Auto-Save Option
» Script to auto ban users without a certain email suffix?
» Script to auto ban users without a certain email suffix?
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum