PageSourceSearch

https://www.welshslate.com/shared_files/clientscripts/enquiry_form/enquiry_form1.js?v4

js welshslate.com collected 2026-10-02 12:23:42 UTC 1,641 bytes, 73 lines download raw bytes

1function submit_enquiry_form(){
2	if(!validate_enquiry_form()){
3		return false;
4	}
5
6	var form_data={};
7
8	$('#enquiry_form').find('input, select, textarea').each(function(){
9		var element_name=$(this).attr('name');
10
11		if(typeof(element_name)=='undefined'){
12			return;
13		}
14
15		if($(this).is(':checkbox') || $(this).is(':radio')){
16			if($(this).is(':checked')){
17				form_data[element_name]=$(this).val();
18			}
19
20		} else {
21			form_data[element_name]=$(this).val();
22		}
23	});
24
25	$.ajax({
26		cache: false,
27		data: form_data,
28		dataType: 'json',
29		error: function(){
30			alert('There was an error submitting this request. Please try again.');
31		},
32		success: function(data){
33			if(data.form_result=='error'){
34				$('#enquiry_form_error').html(data.message);
35				$('#enquiry_form_error').slideDown();
36
37			} else if(data.form_result=='success'){
38				$('#enquiry_form_error').slideUp('slow', function(){
39					$('#enquiry_form_error').html('');
40
41					$('#enquiry_form').hide();
42					$('#enquiry_form_success').html(data.message);
43					$('#enquiry_form_success').show();
44				});
45			}
46		},
47		type: 'POST',
48		url: enquiry_form_ajax_url
49	});
50
51	return false;
52}
53
54function enquiry_form_confirm(){
55	if(typeof(enquiry_form_confirm_callback)=='function'){
56		enquiry_form_confirm_callback();
57		return;
58	}
59
60	reset_enquiry_form();
61}
62
63function reset_enquiry_form(){
64	if($('#enquiry_form').length<1){
65		document.location.href=document.location.href;
66		return;
67	}
68
69	$('#enquiry_form_success').hide();
70	$('#enquiry_form_success').html('');
71	$('#enquiry_form')[0].reset();
72	$('#enquiry_form').show();
73}

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.