PageSourceSearch

https://www.upu.int/Scripts/formAutoPost.js

js upu.int collected 2026-10-01 08:35:16 UTC 1,550 bytes, 54 lines download raw bytes

1(function ($) {
2    'use strict';
3
4    $.fn.formAutoPost = function (options, type) {
5
6        //console.log(options);
7        // Default settings
8        var settings = $.extend({
9            targetContainerSelector: "#target-list",
10            url: "", 
11            type: ""
12        }, options);
13
14        var onSuccess = function(data) {
15
16            if (settings.type === 'categories') {
17                $("input[name='PageNumber']").val(0);
18                $("input[name='SelectedCategory']:hidden").val($("select[name='SelectedCategory']").val());
19                $("input[name='SelectedYear']:hidden").val($("select[name='SelectedYear']").val());
20            }
21
22            $(settings.targetContainerSelector).html(data);
23        };
24
25        var getAjaxParameters = function(htmlControl) {
26            var $form = $(htmlControl).closest("form");
27
28            return {
29                url: $form.attr("action"),
30                method: $form.attr("method"),
31                data: $form.serialize()
32            };
33        };
34
35        var ajaxCall = function() {
36            var ajaxParams = getAjaxParameters(this);
37            $.ajax({
38                method: ajaxParams.method,
39                url: ajaxParams.url,
40                data: ajaxParams.data,
41                success: onSuccess
42            });
43        };
44
45        if (type === 'input') {
46            return this.click(ajaxCall);
47        } else {
48            return this.change(ajaxCall);
49        }
50
51        
52    };
53
54}(jQuery));

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.