PageSourceSearch

https://info.mors.org/NOAH/scripts/ClientValidation.js

js mors.org collected 2026-09-24 09:41:31 UTC 2,289 bytes, 80 lines download raw bytes

1
2function ClientButtonValidate(sender, validationGroup, buttonDisabledText) {
3    var result;
4    var disabledText = "Processing...";
5    try {
6        //check if button change text was passed in
7        if (buttonDisabledText != undefined && buttonDisabledText != null && buttonDisabledText != "") {
8            disabledText = buttonDisabledText;
9        }
10    }
11    catch (e) {
12        disabledText = "Processing...";
13    }
14
15    try {
16        if (Page_ClientValidate(validationGroup)) {
17            $("#" + sender.id).attr("disabled", true);
18            $("#" + sender.id).val(disabledText);
19            result = true;
20        }
21        else {
22            result = false;
23            //do not block the next submit (AutoPostBack) on other controls
24            Page_BlockSubmit = false;
25        }
26    }
27    catch (e) {
28        $("#" + sender.id).attr("disabled", true);
29        $("#" + sender.id).val(disabledText);
30        result = true;
31    }
32
33    return result;
34}
35
36function ClientValidationSummary(sender, args) {
37    var valid = true;
38    var summary = "";
39
40    try {
41        if (typeof Page_Validators != 'undefined') {
42            //loop through validators and check if any failed
43            for (i = 0; i < Page_Validators.length; i++) {
44                if (!Page_Validators[i].isvalid) {
45                    summary = summary + Page_Validators[i].errormessage + "<br />";
46                }
47            }
48
49            //not valid if summary has text
50            if (summary.length > 0) {
51                valid = false;
52                sender.innerHTML = summary;
53            }
54        }
55    }
56    catch (e) {
57        valid = true;
58    }
59
60    args.IsValid = valid;
61}
62
63function ToggleAspValidator(validatorClientID, isEnabled) {
64    try {
65        if (typeof Page_Validators != 'undefined') {
66            for (i = 0; i <= Page_Validators.length; i++) {
67                if (Page_Validators[i] != null) {
68                    if ($(Page_Validators[i]).attr("id") == validatorClientID) {
69                        ValidatorEnable(Page_Validators[i], isEnabled);
70                    }
71                }
72            }
73        }
74    }
75    catch (e) {
76        //error
77        //alert(e);
78        return;
79    }
80}

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.