You can use the following javascript to attach event handlers to the begin and end request events of the pagerequestmanager, and use them to show and hide your progress div accordingly
<script language="javascript" type="text/javascript">var prm = Sys.WebForms.PageRequestManager.getInstance();prm.add_beginRequest(BeginRequestHandler);prm.add_endRequest(EndRequestHandler);function BeginRequestHandler(sender, args){$get('divProgress').style.visibility = 'visible';}function EndRequestHandler(sender, args){$get('divProgress').style.visibility = 'hidden';}</script><div id="divProgress" style="visibility:hidden;"><img src="ajaxloading.gif"></div>
Hello, and thanks for the reply.
It sure is a quicky, but it doesn't want to work in my setup...
I am using master pages, and the content is in a content div tag.
where does the javascript code need to be placed - in the master page, or within the content page?
thanks for the reply!!
take care
tony
javascript should go in the master page. Of course you could put it in a .js file and use the ScriptManager to reference the javascript.
Nick
Hello friend
i m using the same Ajax graphic with master page embedded in it.
IF u solve this issue kindly send the code if possible. as m new in ASP.net 2
With Regards
gurmeetkalra196@.gmail.com
Gurmeet
No comments:
Post a Comment