I have a asp htmleditor where the user will enter any text or a message…is there any javascript to save the message every 5 seconds as drafts in vb.net .
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
As your question is not much clear, I am assuming that you want to save the text in the database and let’s say the htmleditor is some simple text area. So, you need to do two things to save the texts of the htmleditor as draft.
setInterval()for doing ajax call repeatedly for some given (in your case 5 sec) time interval.So let’s say
saveHtmlEditorText()is the function which does an ajax call to save the text. And now you have to initialize thesetInterval(), you can use thedocument.ready()to initialize.setInterval("saveHtmlEditorText()",5000);You can see more about
setInterval()here.