Guest User

Untitled

a guest
May 20th, 2018
124
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.29 KB | None | 0 0
  1. function ajaxLoad() {
  2. var ed = tinyMCE.get('elm1');
  3. // Do you ajax call here, window.setTimeout fakes ajax call
  4. ed.setProgressState(1); // Show progress
  5. window.setTimeout(function() {
  6. ed.setProgressState(0); // Hide progress
  7. ed.setContent('HTML Here');
  8. }, 500);
  9. }
  10.  
  11. function ajaxLoad() {
  12. var ed = tinyMCE.get('elm1');
  13. // Do you ajax call here, window.setTimeout fakes ajax call
  14. ed.setProgressState(1); // Show progress
  15. window.setTimeout(function() {
  16. ed.setProgressState(0); // Hide progress
  17. ed.setContent(<% ViewData["test"] %>);
  18. }, 500);
  19. }
  20.  
  21. ed.setContent(<%= ViewData["test"] %>); // the equals sign
  22.  
  23. <input type="hidden" id="myTestData" value='<%=ViewData["test"]%>' />
  24.  
  25. $("#myTestData").val();
  26.  
  27. $.post("/jQueryTests/jQueryAddMessageComment", { commentText: commentText }, function(newComment) {
  28. $("#divComments" + id.toString()).html(newComment);
  29. });
  30.  
  31. $.post("/Articles/jQueryDownVoteArticle", { id: id }, function(votes) { document.getElementById("ArticleVotes").innerHTML = votes; }, "json");
  32.  
  33. return PartialView("commentList", new FormViewModel { LastComment = commentText });
  34.  
  35. return Json(new FormViewModel { LastComment = commentText });
Add Comment
Please, Sign In to add comment