Quantcast
Channel: AjaxControlToolkit Work Item Rss Feed
Viewing all articles
Browse latest Browse all 4356

Commented Issue: ModalPopupExtender and ValidationSummary not working on Page_Load [27024]

$
0
0
I have a ModalPopupExtender (mpeAddEdit) that shows on page load. In the ModalPopupExtender there is a ValidationSummary Control (vsDutyLog). If the validationsummary control is present or enabled, then when the call to how the ModalPopupExtender in Page_Load (mpeAddEdit.show() ) , generates an error in the javascript: 'Microsoft JScript runtime error: Object expected' at the line(s) in the javascript reading:

document.getElementById('cphBody_vsDutyLog').dispose = function() {
Array.remove(Page_ValidationSummaries, document.getElementById('cphBody_vsDutyLog'));
}
(function() {var fn = function() {Sys.Extended.UI.ModalPopupBehavior.invokeViaServer('cphBody_mpeAddEdit', true); Sys.Application.remove_load(fn);};Sys.Application.add_load(fn);})();

If the ValidationSummary control is not enabled, or is commented out, then there are no errors generated. Also, if the ModalPopupExtender is shown at any other time than page load, there are no errors (i.e. shown via clicking a link).

It seems like this was somewhat of an issue once before and that the issue related to incorrectly generated javascript (see http://forums.asp.net/t/1175339.aspx/1). The work around here defined seems to alleviate the issue, but then the ValidationSummary is not usable as it is diabled. (See also http://ajaxcontroltoolkit.codeplex.com/workitem/12835?ProjectName=ajaxcontroltoolkit for more information about a suitable interim workaround).

For me this is a high priority issue as it directly affects work I'm currently doing.
Comments: This issue still exists in the latest release 4.1.7.607. I just came across this again by having a ValidationSummary inside the ModalPopup while trying to do a postback with a button getting the data from a FileUpload control.

Viewing all articles
Browse latest Browse all 4356

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>