Hi,
I would like to add a progress indicator on a page. e.g. on a search page, click a button to search from DB, then display the result.
It may take a long time for the search to finish. I would like to show a progress indicator to let user know the action is in place, the result will show up soon.
How can this be done?
Thanks,
Xiaoli
progress indicator on page.
Moderators: Jon, Steve, Ian, Dave
-
- Ebase User
- Posts: 272
- Joined: Fri Dec 14, 2012 2:55 pm
- Location: Ottawa
-
- Moderator
- Posts: 414
- Joined: Fri Sep 07, 2007 3:44 pm
- Location: Sandy, UK
- Contact:
Hi Xiaoli,
You should set the cursor to progress when you click the button.
Just remember to return it afterwards:
Steve
You should set the cursor to progress when you click the button.
Code: Select all
$("*").css("cursor", "progress");
Code: Select all
$("*").css("cursor", "auto");
0 x
-
- Ebase User
- Posts: 272
- Joined: Fri Dec 14, 2012 2:55 pm
- Location: Ottawa
-
- Ebase User
- Posts: 67
- Joined: Wed Aug 15, 2012 1:22 pm
Hi,
Would you be able to advise me where I could put the code to return the cursor back to "auto"? I have a search button which when clicked fetches a database resource. Once the resource has been retrieved, the cursor should return to default but I'm not sure where to place the code.
Any advise would be much appreciated.
Would you be able to advise me where I could put the code to return the cursor back to "auto"? I have a search button which when clicked fetches a database resource. Once the resource has been retrieved, the cursor should return to default but I'm not sure where to place the code.
Any advise would be much appreciated.
0 x
-
- Moderator
- Posts: 414
- Joined: Fri Sep 07, 2007 3:44 pm
- Location: Sandy, UK
- Contact:
Hi geadon,
If you have Ajax switched off on your form (Form Properties), then the cursor will automatically change for you.
If you have Ajax switched on, then you should be able to change the cursor back after the task you are doing is completed.
e.g
Kind regards
Steve
If you have Ajax switched off on your form (Form Properties), then the cursor will automatically change for you.
If you have Ajax switched on, then you should be able to change the cursor back after the task you are doing is completed.
e.g
Code: Select all
function doSomething()
{
try
{
$("*").css("cursor", "progress"); //set cursor
//execute some code here and do something
}
finally
{
$("*").css("cursor", "auto"); //finish
}
}
Steve
0 x
Who is online
Users browsing this forum: No registered users and 9 guests