PageSourceSearch

https://eight80bk.com/js/main.js?v=6

js eight80bk.com collected 2026-10-08 10:40:55 UTC 8,034 bytes, 250 lines download raw bytes

1jQuery(document).ready(function($) {
2
3    $( ".register_form" ).submit(function( event ) {
4
5        event.preventDefault();
6
7        $('.submit').text('Processing');
8        $('.submit').attr("disabled","disabled");
9
10        var form = $(this);
11        var valid = 1;
12
13        rd_url = form.find("input[name='rd_url']").val();
14
15        form.find("[req=1]").each(function() {
16
17            var elem = $(this);
18            if (elem.parents('.hide').length) return;
19
20            if (elem.val().length < 1) {
21                valid = 0;
22                $.alert({
23                    title: '',
24                    content: 'Please fill in ' + elem.attr("placeholder").replace('*', ' ').toUpperCase(),
25                    onDestroy: function() {
26                        elem.focus();
27                    }}
28                );
29
30                return false;
31            }
32            if (elem.attr('eml') == "1" && !validateEmail(elem.val())) {
33                valid = 0;
34                $.alert({
35                    title: '',
36                    content: 'Please enter a valid email address for ' + elem.attr("placeholder").replace('*', ' ').toUpperCase(),
37                    onDestroy: function() {
38                        elem.focus();
39                    }}
40                );
41
42                return false;
43            }
44        });
45
46        if (valid == 0) {
47            $('.submit').text('Submit and continue to disclosures');
48            $('.submit').removeAttr("disabled");
49
50            return false;
51        }
52        else {
53
54            $.ajax({
55                type: 'POST',
56                url: '/contact',
57                data: form.serialize(),
58                success: function (response) {
59
60                    if (response.code == 101) {
61
62                        var url ='https://app.boldsign.com/document/sign-bulk-links/?documentId=1af7b2b1-a751-4464-8530-200817c20e21s_6xmRH';
63                        window.location.replace(url);
64                    }
65                    else {
66                        $.alert({title: '',content: 'Something went wrong, Please try again.'});
67                    }
68
69                    form[0].reset();
70
71                    $('.submit').text('Submit and continue to disclosures');
72                    $('.submit').removeAttr("disabled");
73
74                },
75                error:function(){
76                    $.alert({title: '',content: 'loading error.'});
77                }
78            });
79        }
80
81        return false;
82    });
83
84    $( ".contact_form" ).submit(function( event ) {
85
86        event.preventDefault();
87
88        $('.btn_label_send').text('Processing');
89        $('.submit').attr("disabled","disabled");
90
91        var form = $(this);
92        var valid = 1;
93
94        first_name = $(this).find("input[name='FirstName']").val();
95        last_name = $(this).find("input[name='LastName']").val();
96        email = $(this).find("input[name='Email']").val();
97        rd_url = form.find("input[name='rd_url']").val();
98
99        form.find("[req=1]").each(function() {
100
101            var elem = $(this);
102            if (elem.parents('.hide').length) return;
103
104            if (elem.val().length < 1) {
105                valid = 0;
106                $.alert({
107                    title: '',
108                    content: 'Please fill in ' + elem.attr("placeholder").replace('*', ' ').toUpperCase(),
109                    onDestroy: function() {
110                        elem.focus();
111                    }}
112                );
113
114                return false;
115            }
116            if (elem.attr('eml') == "1" && !validateEmail(elem.val())) {
117                valid = 0;
118                $.alert({
119                    title: '',
120                    content: 'Please enter a valid email address for ' + elem.attr("placeholder").replace('*', ' ').toUpperCase(),
121                    onDestroy: function() {
122                        elem.focus();
123                    }}
124                );
125
126                return false;
127            }
128        });
129
130        if (valid == 0) {
131            $('.btn_label_send').text('Submit');
132            $('.submit').removeAttr("disabled");
133
134            return false;
135        }
136        else {
137
138            $.ajax({
139                type: 'POST',
140                url: '/contact',
141                data: form.serialize(),
142                success: function (response) {
143
144                    if (response.code == 101) {
145
146                        if ( rd_url == 'book' ) {
147
148                            user_info = 'name=' + first_name + ' ' + last_name + '&email=' + email;
149
150                            const ifr = document.getElementById("ifr");
151                            ifr.src = '/conversion/' + rd_url;
152
153                            ifr.addEventListener('load', () => {
154                                // at this point the iframe content has loaded
155                                window.location.href = 'https://calendly.com/eight80-mns/eight80-tour?' + user_info;
156                            });
157                        }
158                        else {
159
160                            $.alert({title: '',content: 'Your message has been sent. Thank you!'});
161                            document.getElementById("ifr").src='/conversion/' + rd_url;
162                        }
163                    }
164                    else {
165                        $.alert({title: '',content: 'Something went wrong, Please try again.'});
166                    }
167
168                    form[0].reset();
169
170                    $('.btn_label_send').text('Submit');
171                    $('.submit').removeAttr("disabled");
172
173                },
174                error:function(){
175                    $.alert({title: '',content: 'loading error.'});
176                }
177            });
178        }
179
180        return false;
181    });
182
183    $( ".floorplan_form" ).submit(function( event ) {
184
185        $('.submit').text('Processing');
186        $('.submit').attr("disabled","disabled");
187
188        first_name = $(this).find("input[name='FirstName']").val();
189        last_name = $(this).find("input[name='LastName']").val();
190        email = $(this).find("input[name='Email']").val();
191        rd_url = $(this).find("input[name='rd_url']").val();
192
193        if ( first_name.length < 1 || !validateEmail(email) ) {
194
195            if ( first_name.length < 1 )
196
197                $.alert({title: '',content: 'Please fill in Name field.'});
198            else
199                $.alert({title: '',content: 'Please enter a valid email address.'});
200
201            $('.submit').text('Send');
202            $('.submit').removeAttr("disabled");
203
204            return false;
205        }
206        else {
207
208            $.ajax({
209                type: 'POST',
210                url: '/contact',
211                data: $(this).serialize(),
212                success: function (response) {
213
214                    if (response.code == 101) {
215
216                        if ( rd_url == 'book' ) {
217
218                            user_info = encodeURIComponent('name=' + first_name + ' ' + last_name + '&email=' + email);
219                            window.location.href = 'https://calendly.com/eight80-mns/eight80-tour?' + user_info;
220                        }
221                        else {
222                            $('.fp_form').addClass('hide');
223                            $('.fp_link').removeClass('hide');
224
225                            document.getElementById("ifr").src='/conversion/' + rd_url;
226                        }
227                    }
228                    else {
229                        $.alert({title: '',content: 'Something went wrong, Please try again.'});
230                    }
231
232                    $('.submit').text('Send');
233                    $('.submit').removeAttr("disabled");
234                },
235                error:function(){
236                    $.alert({title: '',content: 'loading error.'});
237                }
238            });
239        }
240
241        return false;
242    });
243
244    function validateEmail(elementValue) {
245
246        var emailPattern = /[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,4}/;
247        return emailPattern.test(elementValue);
248    }
249
250});

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.