Monday, March 26, 2012

Intercepting Atlas on client

Iv been pndering on this for a couple of days

How can i go about intercepting a particular update, for example. If ihave a page with a grid view inside an updatepanel, a timercontrol thatfires and the gridview is reloaded. If this takes time i'd like to notify the user.
So lets say you want to notify the user when ever any type of routineis being run where atlas is communicating with the server. And lets sayyou want to do something as simple as gmail, a little red div appearsand dissapears accordingly

Any suggestion / ideas would be greatly appreciated

Thanks

DrayI've seen this question asked quite a few times - infact i spent thelast the last 3 hours going through Wilco's Browser and theonline documentation.

I am Still stumped.

This should be a pretty thing - you have a update panel - and you need a callback for it ? Please somebody from the team ...

We can have a callback if we are manually making a call - but where dowe specify the callback location if you have an update panel ?
Anybody ? how can we intercept in Javascript if an update is complete(using update panel on the page).

Is Something like Function OnComplete() Available?

This will help is making loaders etc...

Atlas team ?
No response means it's impossible?

hello.

have you tried using the updateprogress control? it should solve your problem...


Thanks for response

but I do not see how updateprogress can help me.
I need to know that particular update action has been completed.
Maybe I've overlooked somethig?

hello again.

see if this page does what you need:

<%

@.PageLanguage="C#" %>

<!

DOCTYPEhtmlPUBLIC"-//W3C//DTD XHTML 1.0 Transitional//EN""http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<

scriptrunat="server">void h(object sender,EventArgs args)

{

info.Text = ((

Button)sender).ID +" " +DateTime.Now.ToString();

System.Threading.

Thread.Sleep(2000);

}

</

script>

<

htmlxmlns="http://www.w3.org/1999/xhtml">

<

headrunat="server"><title>Untitled Page</title>

</

head>

<

body><formid="form1"runat="server"><atlas:ScriptManagerrunat="server"id="manager"EnablePartialRendering="true"></atlas:ScriptManager><atlas:UpdatePanelrunat="server"ID="panel"><ContentTemplate><asp:Buttonrunat="server"ID="bt"Text="Submit"OnClick="h"/><asp:Literalrunat="server"ID="info"/></ContentTemplate></atlas:UpdatePanel><atlas:updateprogressrunat="server"ID="prog1"><ProgressTemplate>

Updating...you can put what you want here... an img, etc;

you can position it with css, if that's important

</ProgressTemplate></atlas:updateprogress></form>

</

body>

</

html>
I've created exactlly the same demo web on my machine :).
But I need to know about completion of an action on client side.
I need to call my own java script function.I think that it should base on
interception of Atlas call and adding my own handler of oncomplete event.

hello.

maybe something like this?

http://forums.asp.net/thread/1263367.aspx


Luis Abreu:

hello.

maybe something like this?

http://forums.asp.net/thread/1263367.aspx

Thanks, that what I've been looking for although it looks like kind of hack :).
How can I get a list of available methods and properties of "args" and "obj" objects
from following event handler:
function changed( obj, args )

I need to know for examply which UpdatePanel caused post back.

Thanks again

No comments:

Post a Comment