public static function textToUidJs($wrap_js_tags = true, array $link_ids = [], $max_length = 99, $run_on_page_load = true, $run_on_input_change = true)
    {
        // Js inner part
        echo self::uidFromTextJsFunction($wrap_js_tags);

        if ($link_ids) {
            if ($wrap_js_tags) {
                echo '<script>';
            }

            $auto_run = $run_on_page_load || $run_on_input_change;

            foreach ($link_ids as $id_src => $id_dst) {
                echo '
                function uidFromTextEvent_', $id_src, '_', $id_dst, '() {
                    document.getElementById("', $id_dst, '").value = uidFromText(document.getElementById("', $id_src, '").value, ', $max_length, ');
                }
                ',
                ($auto_run ? '$(function() {' : ''),
                ($run_on_page_load ? 'uidFromTextEvent_' . $id_src . '_' . $id_dst . '();' : ''),
                ($run_on_input_change ? 'document.getElementById("' . $id_src . '").onchange = uidFromTextEvent_' . $id_src . '_' . $id_dst . '; document.getElementById("' . $id_src . '").onkeyup = uidFromTextEvent_' . $id_src . '_' . $id_dst . ';' : ''),
                ($auto_run ? '});' : '');
            }

            if ($wrap_js_tags) {
                echo '</script>';
            }
        }
    }