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 Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

pointer, hourglass and back to pointer again?

Status
Not open for further replies.

skitty123

Technical User
May 4, 2004
56
US
I have a fucntion call on the server side the takes 3-4 minutes as its inserting several records in the database. In the mean time users of the asp page get impatient and keep clicking the "submit" button,
though I have added a warning message etc, the best solution woudl be to have a hourglass apear after the "Submit" is pressed once and have it change back to a pointer once the function call is over ( ie records inserted).
but from what I can find in my search is that there is no way to do a client side thing like this purely from the server. some solutions mention how to change it to an hourglass on click, but how do I make it change it back to a pointer?
 
ok never mind I figured out how by combining info from 2 other threads (thanks to millerk and LV!!!)..

here is what i used

// in the code behind in the

override protected void OnInit(EventArgs e)
{
....//
btnSubmit.Attributes.Add
("onclick", "javascript:hourglass();");
}
// the aspx page

<SCRIPT language="javascript">
function hourglass()
{
document.body.style.cursor = "wait";
}

when the page reloads, the pointer chanegs back
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top