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

1

1 Answer 1

3

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

<script type="text/javascript">
    $(document).ready(function () {
        //do something here
    });
</script>
Sign up to request clarification or add additional context in comments.

1 Comment

My god, why do I always think the logic has to be surreal! Many thanks..so simple!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.