PageSourceSearch

http://www.albuquerquehomesolutions.com/scripts/ContactUtils.js

js albuquerquehomesolutions.com collected 2026-10-04 21:19:29 UTC 2,717 bytes, 91 lines download raw bytes

1/*
2============================
3TEAM MEMBER LIGHTBOX FUNCTIONS
4============================
5*/
6
7function showJsError_ContactForm(errormsg)
8{
9	if (errormsg !='')
10	{
11		$('.formerror').html(errormsg);
12	}
13	$('#lightbox-messaging').show().animate({top:"0"}, {duration:800, easing: 'easeOutExpo'}).animate({top:"-50px"}, {duration:300, easing: 'easeInExpo'});
14	setTimeout ('$("#lightbox-messaging a.closeerror").fadeTo(800, 1.0);', 1200);
15		$('#lightbox-messaging a.closeerror').click(
16			   function() {
17					closeJsError_ContactForm();
18			   }
19			);
20}
21
22
23function OnContactFormAjaxError(arg, msg) {
24	showJsError_ContactForm(msg);
25}
26
27function closeJsError_ContactForm()
28{
29	$("#lightbox-messaging a.closeerror").fadeTo(800, 0.0);
30	$('#lightbox-messaging').animate({top:"-300px"}, {duration:800, easing: 'easeInExpo', complete:hideErrorMessaging_ContactForm});
31}
32
33function hideErrorMessaging_ContactForm() {
34	$('#lightbox-messaging').hide();
35}
36
37function ThankYouContactForm(title, msg)
38{
39	$('#contact-us-thankyou').find('h2').html(title);
40	$('#contact-us-thankyou').find('p').html(msg);
41	$('#contact-us-form-container').fadeTo(800, 0.0, function() { $('#contact-us-form-container').hide(function() { $('#contact-us-thankyou').show('slow'); }); });
42
43	$('#contact-us-form-container').find('#contactform_fromname').val('');
44	$('#contact-us-form-container').find('#contactform_fromemail').val('');
45	$('#contact-us-form-container').find('#contactform_subject').val('');
46	$('#contact-us-form-container').find('#contactform_message').val('');
47	$('#contact-us-form-container').find('.clear-after-submit').val('');
48}
49
50function OnReCaptchaSolutionExpire() {
51	var widgetId = $('#send-contact-form #contactform_recaptcha').attr("data-widgetid");
52	grecaptcha.reset(widgetId);
53}
54
55/*
56============================
57SEND TEAM MEMBER EMAIL FUNCTIONS
58============================
59*/
60function SendContactForm() {
61    var form = $('#send-contact-form');
62		$.ajax({
63			url: form.attr('action'),
64			type: "POST",
65			data: form.serialize(),
66			success: OnContactFormComplete,
67			statusCode: {
68				400: function (res) {
69					showJsError_ContactForm(res.responseText);
70				},
71				401: function () {
72					var widgetId = $('#send-contact-form #contactform_recaptcha').attr("data-widgetid");
73					grecaptcha.reset(widgetId);
74					showJsError_ContactForm("Please complete the reCAPTCHA before sending your message.");
75				}
76			}
77		});
78}
79
80function OnContactFormComplete(arg)
81{
82	if (arg.Success)
83	{
84		closeJsError_ContactForm();
85		ThankYouContactForm(Rps.International.Resources.Common.Success, arg.Message);
86	}
87	else
88	{
89		showJsError_ContactForm(arg.Message);
90	}
91}

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.