Monday, March 26, 2012

Waitcursor

Hi,

Is it possible to change the mousecursor to a waitcusor/hourglass while in Atlas-fetching-data-progress?

Something like...

<atlas:UpdateProgressID="atlUpdateProgress"runat="server">
<ProgressTemplate>
Change the cursor somehow??
</ProgressTemplate>
</atlas:UpdateProgress>

Thanks!

Mojo

hello.

inspired in previous posts:

<%

@.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><styletype="text/css">body

{

margin:0;width:100%;height:100%;border:solid1pxred;

}

</style>

</

head>

<

bodyid="myBody"><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><scripttype="text/javascript">

Sys.Application.load.add( onLoad );

function

onLoad()

{

var

page = $object("_PageRequestManager");

page.propertyChanged.add( changed );

}

function

changed( obj, args )

{

if

( args.get_propertyName() =="inPostBack" )

{

if( obj.get_inPostBack() )

document.body.style.cursor =

"wait";else

document.body.style.cursor =

"";

}

}

</script></form>

</

body>

</

html>

Hi Luis,

But if I want the page is coved by a gray layer to disabled all elements on the page, how can I do?


fanweixiao:

Hi Luis,

But if I want the page is coved by a gray layer to disabled all elements on the page, how can I do?

Hopefully this helps:

http://forums.asp.net/thread/1244398.aspx (Cristian's post)

So here's what it does...

When the user first comes to the page, it looks like this:

Clicking on the button shows the <atlas:ProgressPanel>

then when its done, Atlas hides the Progress panel and shows the <div> that contains the data

if you need some code posted, lemme know


Yay! This is exactly what I've been looking for! Thanks, Luis :)

No comments:

Post a Comment