PageSourceSearch

https://www.themedicalcity.com/themes/tmc/assets/javascript/contact-us-form.js

js themedicalcity.com collected 2026-09-24 09:39:30 UTC 1,235 bytes, 36 lines download raw bytes

1$(document).ready(() => {
2    $('body').on('submit', '#contact-us__form form', (e) => {
3        e.preventDefault()
4        let form      = $(e.target)
5        let formInput = $('#contact-us__form form').serializeArray()
6        let data      = {}
7
8        for(let i in formInput){
9            data[formInput[i].name] = formInput[i].value
10        }
11
12        let btn_submit = form.find('button[type="submit"]')
13        btn_submit.attr('disabled', true)
14
15        $.request('onSave', {
16            data: data,
17            update: {'contact_us/contact-form': '#contact-us__form'},
18            loading: $.oc.stripeLoadIndicator,
19            success: function() {
20                clearForm(form)
21                btn_submit.attr('disabled', false)
22                $.oc.flashMsg({text: 'Message sent!', 'class': 'fade success', 'interval': 2})
23            },
24            error: function() {
25                btn_submit.attr('disabled', false)
26                $.oc.flashMsg({text: 'Something went wrong.', 'class': 'fade error', 'interval': 2})
27            }
28        })
29
30        function clearForm(el) {
31            el.find('select').val('')
32            el.find('[type="text"]').val('')
33            el.find('textarea').val('')
34        }
35    })
36})

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.