0

I realise I can solve the following problem by using AJAX. However, I didn't realise that a progress wheel would need to implemented so therefore I currently get results via an ActionResult method

   @Html.Action("devExpressGridView")

And at the server...

  return PartialView("devExpressGridView", Object);

So the problem is I need to call some javascript once the partial view has been returned

I know I can call some javascript on a button press or whatever to start to show the progress bar so this isn't no problem,

but once the results has been returned from the action method, I need to hide the progress wheel so the user knows the data retrieval has been done.

I basically need to fire ssomething like

// Once the action method has been completed, fire this...

        function hideProgress() {
                spinner.fadeOut("fast");
                spinnerVisible = false;
        };

is there a way to do this without AJAX?

Thanks

user3428422
  • 4,300
  • 12
  • 55
  • 119
  • I think you can take a look at this http://stackoverflow.com/questions/2844565/is-there-a-jquery-dom-change-listener/11546242#11546242 – dariogriffo Nov 20 '14 at 13:52

1 Answers1

3

You can add a $(document).ready in the partial view.

<script type="text/javascript">
    $(document).ready(function () {
        //do something here
    });
</script>
Mathieu Labrie Parent
  • 2,598
  • 1
  • 9
  • 10