This is a migrated thread and some comments may be shown as answers.

show loading panel from javascript after radwindow is closed

1 Answer 76 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
Dev-OBA
Top achievements
Rank 1
Dev-OBA asked on 12 Jul 2011, 08:41 PM
Hi

I have a Page A where on button click, I display another page B using radwindow dialog. When button OK is clicked on page B, some data processing is done, dialog is closed and then page is redirected to Page C.
In this scenario, sometimes it takes considerable amount of time when the dialog is closed and page C is loaded. During this time, page A is still available (after the dialog is closed) and user may not know if the processing is going on.

Hence I thought to display a loading panel on Page A once the Dialog of page B is closed. Then this loading panel should stay on the page A until it is redirected to Page C. I do not want to refresh Page A once the dialog page B is closed. 

I tried loadingpanel.show() in the javascript of radwindow eventhandler "OnclientClose". this didnt work. How can I display loaing panel from javascript until page is redirected to page C.  



1 Answer, 1 is accepted

Sort by
0
Genti
Telerik team
answered on 13 Jul 2011, 05:26 PM
Hi Manisha,

In such case you can utilize some Javascript to inject a node with a loading image in the DOM.

Say, you wrapped the entire contents of your page in div container with id set to "content".
Then you get that object and alter the HTML to add the loading image:
i.e

var content = document.getElementById("content");
var img = document.createElement('img');
img.src="some source path";
content.innerHTML="";//empty all page text
content.appendChild(img);


This solution is really simple but gives the idea how you can create such functionality.

Kind regards,
Genti
the Telerik team

Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!

Tags
Ajax
Asked by
Dev-OBA
Top achievements
Rank 1
Answers by
Genti
Telerik team
Share this question
or