Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to display javascript message based on which control fired AJAX?
    text
    copied!<p>I'm trying to figure out how to display a "Saved" message on the screen (with a fadeout effect courtesy of JQuery) whenever an AJAX call is made from a control that actually saves the form. The form is relatively complicated and has 5 seperate UpdatePanels where some--but not all--of the controls will do a post-back that will save the form.</p> <p>I know which controls should cause the save message to be displayed. However, I don't know how to identify these controls when the AJAX request is complete. I think I need to add my logic in the "endRequestHandler" below but I could be wrong. </p> <p><strong><em>REVISION</em></strong> This is something I may want to use across my entire site. I need to come up with a common mechanism to declaratively indicate that a control should cause the "Saved" message to display whenever it is the source of a post-back. Can I put something on the control that could be accessed in the InitializeRequestHandler or EndRequsetHandler (see below)? Maybe I should just add a custom attribute that I can find using JQuery? <strong><em>END REVISION</em></strong></p> <p>Please let me know if you need more information. Thanks in advance for your help!</p> <pre><code>Sys.WebForms.PageRequestManager.getInstance().add_endRequest(endRequestHandler); function endRequestHandler(sender, args) { //--check to see if the sender should cause the "Saved" message to display //--use JQuery Fadeout effect to make the "Saved Message" display on the screen // temporarily } </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload