{"id":7,"date":"2026-08-25T11:37:11","date_gmt":"2026-08-25T11:37:11","guid":{"rendered":"https:\/\/refero.dev-youronlinesuccess.nl\/?page_id=7"},"modified":"2026-08-25T12:17:57","modified_gmt":"2026-08-25T12:17:57","slug":"7-2","status":"publish","type":"page","link":"https:\/\/refero.dev-youronlinesuccess.nl\/index.php\/7-2\/","title":{"rendered":""},"content":{"rendered":"\n<!-- === START JW.NL KENTEKEN WIDGET === -->\n<div class=\"jw-centered-wrapper\">\n    <form class=\"jw-instant-form\" method=\"post\" name=\"Aanvraag premie inline\" novalidate>\n        <div class=\"jw-centered-flex\">\n            \n            <div class=\"jw-kenteken-box\">\n                <div class=\"jw-eu-strip\" aria-hidden=\"true\">\n                    <svg viewBox=\"0 0 120 120\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\">\n                        <defs><g id=\"star\"><polygon points=\"0,-10 2.245,-3.09 9.51,-3.09 3.633,1.18 5.878,8.09 0,3.82 -5.878,8.09 -3.633,1.18 -9.51,-3.09 -2.245,-3.09\" fill=\"#FFD000\"><\/polygon><\/g><\/defs>\n                        <use href=\"#star\" x=\"60\" y=\"20\"\/> <use href=\"#star\" x=\"80\" y=\"25.36\"\/> <use href=\"#star\" x=\"94.64\" y=\"40\"\/> <use href=\"#star\" x=\"100\" y=\"60\"\/> <use href=\"#star\" x=\"94.64\" y=\"80\"\/> <use href=\"#star\" x=\"80\" y=\"94.64\"\/> <use href=\"#star\" x=\"60\" y=\"100\"\/> <use href=\"#star\" x=\"40\" y=\"94.64\"\/> <use href=\"#star\" x=\"25.36\" y=\"80\"\/> <use href=\"#star\" x=\"20\" y=\"60\"\/> <use href=\"#star\" x=\"25.36\" y=\"40\"\/> <use href=\"#star\" x=\"40\" y=\"25.36\"\/>\n                    <\/svg>\n                    <span>NL<\/span>\n                <\/div>\n                <input type=\"text\" class=\"jw-plate-input jw-kenteken-input-field\" placeholder=\"XX-XX-XX\" inputmode=\"text\" autocomplete=\"off\" autocapitalize=\"characters\" spellcheck=\"false\" maxlength=\"10\" aria-label=\"Voer je kenteken in\" required>\n            <\/div>\n\n            <!-- VUL HIER DE UNIEKE PARTNERNAAM IN -->\n            <input type=\"hidden\" class=\"jw-partner-source\" value=\"JOUW_PARTNER_NAAM_HIER\">\n\n            <button class=\"jw-submit-btn jw-instant-submit-trigger\" type=\"submit\">\n                <span>Nu premie berekenen<\/span>\n                <svg class=\"jw-btn-icon\" viewBox=\"0 0 24 24\" aria-hidden=\"true\"><path d=\"M5 12h14M12 5l7 7-7 7\"><\/path><\/svg>\n            <\/button>\n            \n        <\/div>\n        <div class=\"jw-error-message jw-kenteken-error-box\" role=\"alert\" aria-live=\"polite\" hidden><\/div>\n    <\/form>\n<\/div>\n\n<style>\n    .jw-centered-wrapper { width: 100%; font-family: 'Poppins', Arial, sans-serif; }\n    .jw-centered-wrapper * { box-sizing: border-box !important; }\n    .jw-instant-form { margin: 0 !important; }\n    .jw-centered-flex { display: flex; align-items: center; justify-content: center; gap: 14px; flex-wrap: nowrap; }\n\n    .jw-kenteken-box {\n        display: flex; width: 240px; height: 60px !important; min-height: 60px !important;\n        max-height: 60px !important; flex-shrink: 0; overflow: hidden; position: relative;\n        background: #FFD000; border: 2px solid #111111 !important; border-radius: 6px !important; \n        box-shadow: inset 0 2px 5px rgba(255,255,255,.4) !important; margin: 0 !important; padding: 0 !important;\n    }\n    .jw-kenteken-box:focus-within { box-shadow: inset 0 2px 5px rgba(255,255,255,.4), 0 0 0 3px rgba(255,153,0,.22) !important; }\n\n    .jw-eu-strip { width: 36px; background: #003399; display: flex; flex-direction: column; align-items: center; justify-content: center; padding-top: 4px; flex-shrink: 0; box-shadow: inset -2px 0 4px rgba(0,0,0,0.15); }\n    .jw-eu-strip svg { width: 16px; height: 16px; margin-bottom: 2px; }\n    .jw-eu-strip span { color: #ffffff; font-family: Arial, sans-serif; font-weight: 700; font-size: 11px; line-height: 1; letter-spacing: 0.5px; }\n\n    .jw-plate-input { width: 100%; height: 100%; border: 0 !important; outline: 0 !important; background: transparent !important; color: #111111 !important; text-align: center; font-family: Arial, sans-serif !important; font-size: 26px !important; font-weight: 700 !important; letter-spacing: 1.5px !important; text-transform: uppercase !important; padding: 0 5px !important; margin: 0 !important; box-shadow: none !important; border-radius: 0 !important; line-height: normal !important; }\n    .jw-plate-input::placeholder { color: rgba(17,17,17,0.25) !important; font-size: 26px !important; font-weight: 700 !important; }\n\n    .jw-submit-btn { appearance: none; border: 0 !important; border-radius: 8px !important; background: #FF9900 !important; color: #FFFFFF !important; font-family: inherit !important; font-size: 16px !important; font-weight: 700 !important; padding: 0 24px !important; margin: 0 !important; cursor: pointer; width: 250px; height: 60px !important; min-height: 60px !important; max-height: 60px !important; flex-shrink: 0; display: inline-flex !important; align-items: center; justify-content: center; gap: 8px; transition: background-color .2s ease, transform .2s ease; white-space: nowrap; line-height: normal !important; }\n    .jw-submit-btn:hover, .jw-submit-btn:focus { background: #E68A00 !important; transform: translateY(-1px); }\n    .jw-submit-btn:disabled { opacity: .72; cursor: not-allowed; transform: none; }\n    .jw-submit-btn svg.jw-btn-icon { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; margin: 0 !important; }\n\n    .jw-error-message { margin-top: 15px; padding: 12px; border-radius: 8px; background: #FEE2E2; color: #DC2626; font-size: 13.5px; font-weight: 600; line-height: 1.5; width: 100%; text-align: center; }\n    .jw-spinner { width: 18px; height: 18px; animation: jw-spin 1s linear infinite; stroke: currentColor; }\n    @keyframes jw-spin { 100% { transform: rotate(360deg); } }\n\n    @media (max-width: 768px) {\n        .jw-centered-flex { flex-direction: column; gap: 12px; }\n        .jw-kenteken-box, .jw-submit-btn { width: 100% !important; max-width: 100% !important; }\n        .jw-plate-input, .jw-plate-input::placeholder { font-size: 34px !important; letter-spacing: 2.5px !important; }\n        .jw-submit-btn { white-space: normal; }\n    }\n<\/style>\n\n<script>\n(function () {\n    'use strict';\n    \n    \/\/ URL's geforceerd naar www.jw.nl om redirect-errors te voorkomen\n    var API_URL = 'https:\/\/www.jw.nl\/wp-json\/jw\/v1\/voertuiginfo';\n    var SITE_SCHEME = 'https';\n    var SITE_HOST = 'www.jw.nl';\n    \n    var ROUTE_PATHS = { Personenauto: '\/autoverzekering', Bestelauto: '\/bestelautoverzekering-afsluiten', Bromfiets: '\/scooterverzekering-afsluiten', Snorfiets: '\/scooterverzekering-afsluiten', Motorfiets: '\/motorverzekering-afsluiten', Taxi: '\/taxiverzekering', Vrachtauto: '\/vrachtwagenverzekering' };\n    var ZAKELIJKE_TYPES = { Aanhangwagen: true, Brommobiel: true, DriewieligMotorcarier: true, DriewieligMotorvoertuig: true, Kampeerauto: true, Caravan: true, Oplegger: true, Quad: true, WerkmaterieelGemotoriseerd: true, WerkmaterieelNietGemotoriseerd: true, Onbekend: true };\n\n    function cleanKenteken(value) { return String(value || '').replace(\/[^A-Za-z0-9]\/g, '').toUpperCase(); }\n    function sanitizeVisibleKenteken(value) { return String(value || '').toUpperCase().replace(\/[^A-Z0-9-]\/g, '').slice(0, 10); }\n\n    function getTrackingParams(partnerInput) {\n        var searchParams = new URLSearchParams(window.location.search);\n        var psParam = searchParams.get('ps');\n        if (psParam) return '&ps=' + encodeURIComponent(psParam);\n        \n        \/\/ Nu pakt hij \u00e1ltijd de value uit het veld, ook al is het de placeholder tekst\n        if (partnerInput && partnerInput.value) {\n            return '&ps=' + encodeURIComponent(partnerInput.value.trim());\n        }\n        return '';\n    }\n\n    function buildUrl(path, kenteken, trackingParams, hash) {\n        var url = SITE_SCHEME + ':\/\/' + SITE_HOST + path + '?lp=' + encodeURIComponent(kenteken) + trackingParams;\n        if (hash) url += hash;\n        return url;\n    }\n\n    function getRedirectUrl(voertuigsoort, kenteken, trackingParams) {\n        if (ROUTE_PATHS[voertuigsoort]) return buildUrl(ROUTE_PATHS[voertuigsoort], kenteken, trackingParams, '');\n        if (ZAKELIJKE_TYPES[voertuigsoort]) return buildUrl('\/zakelijke-verzekeringen', kenteken, trackingParams, '#afsluiten');\n        return '';\n    }\n\n    var forms = document.querySelectorAll('.jw-instant-form');\n    forms.forEach(function (form) {\n        var input = form.querySelector('.jw-kenteken-input-field');\n        var submitBtn = form.querySelector('.jw-instant-submit-trigger');\n        var errorBox = form.querySelector('.jw-kenteken-error-box');\n        var partnerInput = form.querySelector('.jw-partner-source');\n\n        if (!input || !submitBtn || !errorBox) return;\n\n        var originalButtonHtml = submitBtn.innerHTML;\n        var loadingButtonHtml = '<svg class=\"jw-spinner\" viewBox=\"0 0 50 50\" aria-hidden=\"true\"><circle cx=\"25\" cy=\"25\" r=\"20\" fill=\"none\" stroke-width=\"4\"><\/circle><\/svg><span>Bezig...<\/span>';\n        var isSubmitting = false;\n\n        function showError(message) { errorBox.textContent = message; errorBox.hidden = false; }\n        function clearError() { errorBox.textContent = ''; errorBox.hidden = true; }\n        function setLoading(state) { submitBtn.disabled = state; submitBtn.innerHTML = state ? loadingButtonHtml : originalButtonHtml; }\n\n        function handleSubmit(event) {\n            event.preventDefault();\n            if (isSubmitting) return;\n            clearError();\n\n            var visibleKenteken = sanitizeVisibleKenteken(input.value);\n            var kenteken = cleanKenteken(visibleKenteken);\n            input.value = visibleKenteken;\n\n            if (kenteken.length < 4) {\n                showError('We konden het kenteken niet verwerken. Controleer of het kenteken juist is ingevuld en probeer het opnieuw.');\n                input.focus();\n                return;\n            }\n\n            isSubmitting = true;\n            setLoading(true);\n            var trackingParams = getTrackingParams(partnerInput);\n\n            fetch(API_URL + '?kenteken=' + encodeURIComponent(kenteken), { \n                method: 'GET', \n                headers: { 'Accept': 'application\/json' }, \n                cache: 'no-store' \n            })\n            .then(function (response) { \n                if (!response.ok) throw new Error('HTTP ' + response.status); \n                return response.json(); \n            })\n            .then(function (data) {\n                if (!data || !data.Voertuigsoort || data.KentekenreeksGeldig === false) {\n                    showError('We konden het kenteken niet verwerken. Controleer of het kenteken juist is ingevuld en probeer het opnieuw.');\n                    return;\n                }\n                var voertuigsoort = String(data.Voertuigsoort).trim();\n                var redirectUrl = getRedirectUrl(voertuigsoort, kenteken, trackingParams);\n                \n                if (!redirectUrl) { \n                    showError('Dit voertuigtype wordt momenteel niet ondersteund.'); \n                    return; \n                }\n                \n                \/\/ Stabiele doorverwijzing in hetzelfde tabblad\n                window.location.assign(redirectUrl);\n            })\n            .catch(function (error) { \n                console.error(\"Fetch Error:\", error);\n                showError('We konden het kenteken niet verwerken. Controleer of het kenteken juist is ingevuld en probeer het opnieuw.'); \n            })\n            .finally(function () { \n                isSubmitting = false; \n                setLoading(false); \n            });\n        }\n\n        input.addEventListener('input', function () {\n            var cleaned = sanitizeVisibleKenteken(this.value);\n            if (this.value !== cleaned) this.value = cleaned;\n            clearError();\n        });\n        input.addEventListener('blur', function () { this.value = sanitizeVisibleKenteken(this.value); });\n        input.addEventListener('keydown', function (event) {\n            if (event.key === 'Enter') {\n                event.preventDefault();\n                if (typeof form.requestSubmit === 'function') { form.requestSubmit(); } else { handleSubmit(event); }\n            }\n        });\n        form.addEventListener('submit', handleSubmit);\n    });\n})();\n<\/script>\n<!-- === EINDE JW.NL KENTEKEN WIDGET === -->\n","protected":false},"excerpt":{"rendered":"<p>NL Nu premie berekenen<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"_links":{"self":[{"href":"https:\/\/refero.dev-youronlinesuccess.nl\/index.php\/wp-json\/wp\/v2\/pages\/7"}],"collection":[{"href":"https:\/\/refero.dev-youronlinesuccess.nl\/index.php\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/refero.dev-youronlinesuccess.nl\/index.php\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/refero.dev-youronlinesuccess.nl\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/refero.dev-youronlinesuccess.nl\/index.php\/wp-json\/wp\/v2\/comments?post=7"}],"version-history":[{"count":6,"href":"https:\/\/refero.dev-youronlinesuccess.nl\/index.php\/wp-json\/wp\/v2\/pages\/7\/revisions"}],"predecessor-version":[{"id":14,"href":"https:\/\/refero.dev-youronlinesuccess.nl\/index.php\/wp-json\/wp\/v2\/pages\/7\/revisions\/14"}],"wp:attachment":[{"href":"https:\/\/refero.dev-youronlinesuccess.nl\/index.php\/wp-json\/wp\/v2\/media?parent=7"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}