How can I show an animated loding icon beside teh dropdown box when postback occurs.
-
Hello, My aim is to show an animated loading icon beside the dropdownbox. When dropdownbox performs a postback the icon should appear and when it gets loaded completely, the icon should disappear. How can I succeed it in client side instead of in server side. Would you please let me know how I can accomplish this. Thanks.
What a curious mind needs to discover knowledge is noting else than a pin-hole.
-
Hello, My aim is to show an animated loading icon beside the dropdownbox. When dropdownbox performs a postback the icon should appear and when it gets loaded completely, the icon should disappear. How can I succeed it in client side instead of in server side. Would you please let me know how I can accomplish this. Thanks.
What a curious mind needs to discover knowledge is noting else than a pin-hole.
The easiest would be to display an animated gif[^] and then hid it once the load is completed. That way you will never need to worry about the animation, just that it is visible or not.
Panic, Chaos, Destruction. My work here is done. Drink. Get drunk. Fall over - P O'H OK, I will win to day or my name isn't Ethel Crudacre! - DD Ethel Crudacre I cannot live by bread alone. Bacon and ketchup are needed as well. - Trollslayer Have a bit more patience with newbies. Of course some of them act dumb - they're often *students*, for heaven's sake - Terry Pratchett
-
Hello, My aim is to show an animated loading icon beside the dropdownbox. When dropdownbox performs a postback the icon should appear and when it gets loaded completely, the icon should disappear. How can I succeed it in client side instead of in server side. Would you please let me know how I can accomplish this. Thanks.
What a curious mind needs to discover knowledge is noting else than a pin-hole.
First download animated gif: - http://www.preloaders.net/[^] - http://www.ajaxload.info/[^] html:
javascript/jQuery:
function ShowHideLoader( divLoader )
{
if($( divLoader ).is(':visible'))
$( divLoader ).hide();
//or
//$( divLoader ).css({display: 'none'});
else
$( divLoader ).show();
//or
//$( divLoader ).css({display: 'block'});}
Hope that helps, Morgs
-
First download animated gif: - http://www.preloaders.net/[^] - http://www.ajaxload.info/[^] html:
javascript/jQuery:
function ShowHideLoader( divLoader )
{
if($( divLoader ).is(':visible'))
$( divLoader ).hide();
//or
//$( divLoader ).css({display: 'none'});
else
$( divLoader ).show();
//or
//$( divLoader ).css({display: 'block'});}
Hope that helps, Morgs
This seems to be only a partial answer; how do you hide it again when the server acknowledges the postback? I'm not really sure how the ASP.net partial postback actually works, and although it's obviously using AJAX underneath, whether there is somewhere you can hang a JS event handler from that will tell you when the response comes back.
-
This seems to be only a partial answer; how do you hide it again when the server acknowledges the postback? I'm not really sure how the ASP.net partial postback actually works, and although it's obviously using AJAX underneath, whether there is somewhere you can hang a JS event handler from that will tell you when the response comes back.
Hi there, I made the function clever enough to do one of the possible two things. I call the function "ShowHide" meaning it can show or hide the animated gif. The function checks if the gif is visible and hides it otherwise shows it. So, just call the same function to show or hide it, safe and sound. Goodluck, Morgs
-
Hi there, I made the function clever enough to do one of the possible two things. I call the function "ShowHide" meaning it can show or hide the animated gif. The function checks if the gif is visible and hides it otherwise shows it. So, just call the same function to show or hide it, safe and sound. Goodluck, Morgs