WangE schrieb:
> I just don't quite understand the following javascript codes:
> MyAjax.dataset.onLoading=function(b) {
> var e=document.getElementById("loadingInfo");
> e.style.visibility=b?"visible":"hidden";
> }
>
> Well,what does the parameter "b" mean?where does it come from,and stands
> for what?
The "b" stand for showing, it's a boolean with true or false. You can
also give them a better name. If you get a true you should show your
loading info and with false you should hide it.
MyAjax.dataset.onLoading=function(show) {
var e=document.getElementById("loadingInfo");
e.style.visibility=show?"visible":"hidden";
}
> It seems this simple sentence works quite good,how does it work?does it
> check the status (of "b") at intervals?
It would be called by the Ajax.NET Pro at the beginning of an
async-request and at the end of that request. Mostly the element is
hiding after your callback-faunction. It would not be called by
sync-request, better it makes even no sense, because the browser would
not update the page.
--
Freundliche Grüße
Albert Weinert
http://der-albert.com
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ajax.NET Professional" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/ajaxpro
The latest downloads of Ajax.NET Professional can be found at
http://www.ajaxpro.info/
Don't forget to read my blog at http://weblogs.asp.net/mschwarz/
-~----------~----~----~----~------~----~------~--~---