I am trying to understand a script generated by Asp.Net Ajax Toolkit, which is currently giving an "object expected" (error goes away if I place my PopupControlExtender in an update panel).
document.getElementById('ctl00_ValidationSummary1').dispose = function() {
Array.remove(Page_ValidationSummaries, document.getElementById('ctl00_ValidationSummary1'));
}
(function() {var fn = function() {AjaxControlToolkit.ModalPopupBehavior.invokeViaServer('ctl00_c1_componentCategoryListUC_componentCategoryGrid_modalPopupExtender', true); Sys.Application.remove_load(fn);};Sys.Application.add_load(fn);})();
What I see here is:
someobject.someevent = function() {
dosth;
} /* Get ready, I am about to do sth crazy ... */
(function() { dosth; })(); /* you did what? */
What does this syntax mean?
Edit: I am specifically curious about (function () { ... })() coming immediately after another function's ending }.
Edit: Turns out, ajax guys forgot to place a semicolon after the event handler assignment.