Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to change Mousepointer on Web forms.

Status
Not open for further replies.

pauldef

Programmer
Dec 9, 2002
3
0
0
US
Called a web service to get weather report for a supplied zip. Works, but takes time. Thought I'd show an hourglass while waiting for the service to respond. Found a way to do it on win forms, but not web forms. Is this possible? New to web design & .NET.
 
Thanks Kris. I'm checking out that site now.

Meanwhile I found an answer below in the ASP.NET forum in response to ChrisTheProgrammer's "Make the mouse pointer an hourglass". I tried it and it works. Also, after the click event of the button that calls the web service is complete, the pointer automatically goes back to normal! I don't understand that, but it works.

millerk (Programmer) Jul 15, 2002
I have a button named cmdReport. In my aspx.vb file's Page_Load sub I put this :
cmdReport.Attributes("onclick") = "javascript: hourglass();"

Then in the <HEAD> of my .aspx file I put this:
<script language=&quot;javascript&quot;>
function hourglass()
{
document.body.style.cursor = &quot;wait&quot;;
}
</script>

Works great for me and it's simple.

Shanti
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top