PageSourceSearch

https://subscribe.sarasotamagazine.com/SAR/scripts/modSubmit.js?v=20260409122118

js sarasotamagazine.com collected 2026-10-02 02:53:19 UTC 6,615 bytes, 181 lines download raw bytes

1$(document).ready(function () {
2    var $self = $('[id$=submit_btn]');
3    if ($self.is("a")) {
4        window._href = $self.attr('href');
5        $self.removeAttr('href');
6        $self.prop('disabled', false);
7    }
8
9});
10
11function validate_custom() {
12
13    //Special coding for pages with the custom gift module to avoid potentially dangerous issue
14    //Some pubs may have their own version of this function if it needs to be different in the pub JS file
15    //This is the generic version
16    if ($('#module_customgift_wrapper').length > 0) {
17
18        //If the ecard date is on the form then validate it
19        if ($(".cgGift").length > 0) {
20            if ($("input[name='ecarddate']").length > 0 || $("textarea[name='ecardmsg']").length > 0) {
21                if (!validate_ecard_customgift()) {
22                    return false;
23                }
24            }
25        }
26
27        var retVal = false;
28        //Validate the form including the CC on the client side
29        //to prevent a page reload so as not to lose the recipients
30        var validRecip = validateRecipients();
31
32        //Is the cc on the page and is it checked
33        if ($("#rgCC").length > 0) {
34            if ($("#rgCC").is(':checked')) {
35                var validCC = validate_cc();
36                var validCCMonth = validate_ccmonth();
37                var validCCYear = validate_ccyear();
38                var validCCV = validate_ccv();
39
40                //If the credit card is valid or the bill me is checked
41                if (validRecip && validCC && validCCMonth && validCCYear && validCCV) {
42                    processCustomGift();
43                    retVal = true;
44                    submitPage()
45                }
46            }
47        }
48
49        //Is the bill me on the page and is it checked
50        if ($("#billme").length > 0) {
51            if ($("#billme").is(':checked')) {
52                //If the credit card is valid or the bill me is checked
53                if (validRecip) {
54                    processCustomGift();
55                    retVal = true;
56                    submitPage()
57                }
58            }
59        }
60
61        return retVal;
62    }
63    else {
64        if (validateAutoRenewCaliforniaVermontRules()) {
65            //Initial validate_custom function contained only the following lines
66            var retVal = true;
67            submitPage()
68            return retVal;
69        }
70        else {
71            return false;
72        }
73    }
74}
75
76function submitPage() {
77    //Perform last minute check if California or Vermont 
78    //and monthly then auto renew should be checked
79    //function returns true if OK
80    if (validateAutoRenewCaliforniaVermontRules()) {
81        //Submit as normal
82        if (typeof (Page_ClientValidate) == 'function') {
83            var isPageValid = Page_ClientValidate('main');
84            if (isPageValid) {
85                $('[id$=submit_btn]').prop('disabled', true);
86                $('[id$=submit_btn]').text('Please Wait...');
87                $('[id$=submit_btn]').css('display', 'none');
88
89                //document.getElementById('submit_btn').disabled = true;
90                document.getElementById('hdnFieldSubmitinProgress').value = 'Y';
91                __doPostBack('submit_btn', '');
92            }
93        }
94    }
95    else {
96        return false;
97    }
98}
99
100function processCustomGift() {
101    //Save the Custom Gift data to the MultiGift datatable
102    saveCustomGiftData();
103
104    //Remove Custom Gift HTML from page to prevent potentially dangerous error 
105    //and save actual number of recipients in case the page has to reload because of an error
106    varCustomGiftText = $('#hdnCustomGift').val()
107    if (varCustomGiftText != "") {
108        varCustomGiftText = replaceAll(varCustomGiftText, '<', '&lt;')
109        varCustomGiftText = replaceAll(varCustomGiftText, '>', '&gt;')
110        $('#hdnCustomGift').val(varCustomGiftText);
111        $('#hdnCustomGiftIndex').val($('.cgGift').length);
112    }
113}
114
115function resumeValidate_Custom() {
116    //This is basically a copy of the validate_custom function above.
117    //This will be called by certain pub JS files that have there own custom validate_custom function
118    //and need to call the default validate custom process
119
120    //Special coding for pages with the custom gift module to avoid potentially dangerous issue
121    //Some pubs may have their own version of this function if it needs to be different in the pub JS file
122    //This is the generic version
123    if ($('#module_customgift_wrapper').length > 0) {
124
125        //If the ecard date is on the form then validate it
126        if ($(".cgGift").length > 0) {
127            if ($("input[name='ecarddate']").length > 0 || $("textarea[name='ecardmsg']").length > 0) {
128                if (!validate_ecard_customgift()) {
129                    return false;
130                }
131            }
132        }
133
134        var retVal = false;
135        //Validate the form including the CC on the client side
136        //to prevent a page reload so as not to lose the recipients
137        var validRecip = validateRecipients();
138
139        //Is the cc on the page and is it checked
140        if ($("#rgCC").length > 0) {
141            if ($("#rgCC").is(':checked')) {
142                var validCC = validate_cc();
143                var validCCMonth = validate_ccmonth();
144                var validCCYear = validate_ccyear();
145                var validCCV = validate_ccv();
146
147                //If the credit card is valid or the bill me is checked
148                if (validRecip && validCC && validCCMonth && validCCYear && validCCV) {
149                    processCustomGift();
150                    retVal = true;
151                    submitPage()
152                }
153            }
154        }
155
156        //Is the bill me on the page and is it checked
157        if ($("#billme").length > 0) {
158            if ($("#billme").is(':checked')) {
159                //If the credit card is valid or the bill me is checked
160                if (validRecip) {
161                    processCustomGift();
162                    retVal = true;
163                    submitPage()
164                }
165            }
166        }
167
168        return retVal;
169    }
170    else {
171        if (validateAutoRenewCaliforniaVermontRules()) {
172            //Initial validate_custom function contained only the following lines
173            var retVal = true;
174            submitPage()
175            return retVal;
176        }
177        else {
178            return false;
179        }
180    }
181}

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.