Guest User

Untitled

a guest
Jun 24th, 2018
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.24 KB | None | 0 0
  1. Sys.WebForms.PageRequestManager.getInstance().add_endRequest(endRequestHandler);
  2.  
  3. function endRequestHandler(sender, args) {
  4. //--check to see if the sender should cause the "Saved" message to display
  5. //--use JQuery Fadeout effect to make the "Saved Message" display on the screen
  6. // temporarily
  7. }
  8.  
  9. //--Get an instance of the PageRequestManager so we can
  10. // designate an end-request handler
  11. var prm = Sys.WebForms.PageRequestManager.getInstance();
  12. //--designed the displayFadeoutMessage as the end request handler
  13. prm.add_endRequest(displayFadeoutMessage);
  14.  
  15. function displayFadeoutMessage() {
  16. //--if there is a message to display then show it
  17. if ($("#ctl00_hfSaveMessageText").attr("value") != "") {
  18. //--add a span to the placeholder span and then fade it out
  19. // over 4.5 seconds
  20. $("#mpSaveSpot").append("<span id='spanFadeoutMessage' style='background-color:#ddd;'>" + $("#ctl00_hfSaveMessageText").attr("value") + "</span>").fadeOut(4500, function() {
  21. //--once the message is faded out then clear the message hidden
  22. // field and clear out the message span
  23. $("#ctl00_hfSaveMessageText").attr("value", "");
  24. $("#mpSaveSpot").empty();
  25. });
  26. }
  27. }
Add Comment
Please, Sign In to add comment