{"id":45961,"date":"2025-07-29T18:59:33","date_gmt":"2025-07-29T11:59:33","guid":{"rendered":"https:\/\/worldvision.or.th\/donate-csfund\/"},"modified":"2025-11-19T17:34:23","modified_gmt":"2025-11-19T10:34:23","slug":"donate-csfund","status":"publish","type":"page","link":"https:\/\/worldvision.or.th\/en\/donate-csfund\/","title":{"rendered":"donate-csfund"},"content":{"rendered":"\t\t<div data-elementor-type=\"wp-page\" data-elementor-id=\"45961\" class=\"elementor elementor-45961 elementor-37312\" data-elementor-post-type=\"page\">\n\t\t\t\t<div class=\"elementor-element elementor-element-82b0427 e-con-full e-flex e-con e-parent\" data-id=\"82b0427\" data-element_type=\"container\" data-e-type=\"container\" data-settings=\"{&quot;background_background&quot;:&quot;classic&quot;}\">\n\t\t<div class=\"elementor-element elementor-element-dfce70c e-con-full e-flex e-con e-child\" data-id=\"dfce70c\" data-element_type=\"container\" data-e-type=\"container\" data-settings=\"{&quot;background_background&quot;:&quot;classic&quot;}\">\n\t\t\t\t<div class=\"elementor-element elementor-element-7f66304 elementor-widget elementor-widget-image\" data-id=\"7f66304\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"image.default\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<img fetchpriority=\"high\" decoding=\"async\" width=\"1920\" height=\"1080\" src=\"https:\/\/worldvision.or.th\/wp-content\/uploads\/2025\/04\/mostneeded-cover.jpg\" class=\"attachment-full size-full wp-image-36105\" alt=\"\" srcset=\"https:\/\/worldvision.or.th\/wp-content\/uploads\/2025\/04\/mostneeded-cover.jpg 1920w, https:\/\/worldvision.or.th\/wp-content\/uploads\/2025\/04\/mostneeded-cover-600x338.jpg 600w, https:\/\/worldvision.or.th\/wp-content\/uploads\/2025\/04\/mostneeded-cover-300x169.jpg 300w, https:\/\/worldvision.or.th\/wp-content\/uploads\/2025\/04\/mostneeded-cover-1024x576.jpg 1024w, https:\/\/worldvision.or.th\/wp-content\/uploads\/2025\/04\/mostneeded-cover-768x432.jpg 768w, https:\/\/worldvision.or.th\/wp-content\/uploads\/2025\/04\/mostneeded-cover-1536x864.jpg 1536w, https:\/\/worldvision.or.th\/wp-content\/uploads\/2025\/04\/mostneeded-cover-1568x882.jpg 1568w\" sizes=\"(max-width: 1920px) 100vw, 1920px\" \/>\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t<div class=\"elementor-element elementor-element-faf864b e-con-full e-flex e-con e-child\" data-id=\"faf864b\" data-element_type=\"container\" data-e-type=\"container\" data-settings=\"{&quot;background_background&quot;:&quot;classic&quot;}\">\n\t\t<div class=\"elementor-element elementor-element-eab8c2d e-flex e-con-boxed e-con e-child\" data-id=\"eab8c2d\" data-element_type=\"container\" data-e-type=\"container\">\n\t\t\t\t\t<div class=\"e-con-inner\">\n\t\t\t\t<div class=\"elementor-element elementor-element-55548a8 elementor-widget elementor-widget-heading\" data-id=\"55548a8\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t\t<h2 class=\"elementor-heading-title elementor-size-default\">Donate to the fund to help children without foster parents.<\/h2>\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-391a1b0 elementor-widget elementor-widget-text-editor\" data-id=\"391a1b0\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t\t\t\t\t\t<p>Your help will be transformed into educational equipment, essential items for daily life, and support for developing vulnerable and poor communities to have a better and sustainable life.<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-f1ad673 elementor-widget elementor-widget-shortcode\" data-id=\"f1ad673\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"shortcode.default\">\n\t\t\t\t\t\t\t<div class=\"elementor-shortcode\"><style>\r\n    .donation-container {\r\n        background: none;\r\n        padding: 20px;\r\n        border-radius: 10px;\r\n        \/*box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);\r\n        width: 100%;*\/\r\n        text-align: center;\r\n    }\r\n    .tab {\r\n        display: flex;\r\n        background: #f3f2f0; \/* Light background for tab *\/\r\n        border-radius: 8px;\r\n        overflow: hidden;\r\n        margin-bottom: 0px;\r\n    }\r\n    .tab button {\r\n        flex: 1;\r\n        padding: 8px;\r\n        border: none;\r\n        background: none;\r\n        font-size: 16px;\r\n        cursor: pointer;\r\n        color: #6d6a76; \/* light black for text *\/\r\n    }\r\n    .tab button.active {\r\n        background: #ffbd9d; \/* Orange soft color for active tab *\/\r\n        color: #111222; \/* midnight black *\/\r\n    }\r\n    .amount-buttons {\r\n        display: flex;\r\n        justify-content: space-between;\r\n        margin-top: 8px;\r\n        margin-bottom: 8px;\r\n    }\r\n    .amount-buttons button {\r\n        width: 30%;\r\n        padding: 8px;\r\n        border: none;\r\n        background: #f3f2f0; \/* Light background for amount buttons *\/\r\n        border-radius: 5px;\r\n        cursor: pointer;\r\n        color: #111222; \/* Midnight black for text *\/\r\n    }\r\n    .amount-buttons button.active {\r\n        background: #111222; \/* Midnight black for active amount button *\/\r\n        color: white;\r\n    }\r\n    input {\r\n        width: 100%;\r\n        padding: 8px;\r\n        border: 1px solid #f3f2f0; \/* Light border for input *\/\r\n        border-radius: 5px;\r\n        margin-bottom: 8px;\r\n        text-align: center;\r\n        color: #111222; \/* Midnight black for input text *\/\r\n    }\r\n    .donate-btn {\r\n        width: 100%;\r\n        padding: 12px;\r\n        background: #ff5515; \/* Orange primary color for donate button *\/\r\n        color: white;\r\n        border: none;\r\n        border-radius: 5px;\r\n        cursor: pointer;\r\n    }\r\n    .donate-btn:hover {\r\n        background: #F14014; \/* Slightly darker orange on hover *\/\r\n    }\r\n    .note {\r\n        font-size: 12px;\r\n        color: gray;\r\n    }\r\n    \/* Styles for the custom message box *\/\r\n    #customMessageBox {\r\n        position: fixed;\r\n        top: 50%;\r\n        left: 50%;\r\n        transform: translate(-50%, -50%);\r\n        background-color: white;\r\n        padding: 20px;\r\n        border-radius: 8px;\r\n        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);\r\n        z-index: 1000;\r\n        text-align: center;\r\n        max-width: 300px;\r\n        font-family: sans-serif;\r\n        color: #111222;\r\n        display: none; \/* Hidden by default *\/\r\n    }\r\n    #customMessageBox button {\r\n        background-color: #ff5515;\r\n        color: white;\r\n        border: none;\r\n        padding: 8px 15px;\r\n        border-radius: 5px;\r\n        cursor: pointer;\r\n        margin-top: 15px;\r\n    }\r\n<\/style>\r\n\r\n<div class=\"donation-container\">\r\n    <div class=\"tab\">\r\n        <button class=\"tab-btn active\" onclick=\"switchTab(this, '42315', 'One time')\" id=\"oneTimeTabLabel\"><\/button>\r\n        <button class=\"tab-btn\" onclick=\"switchTab(this, '42316', 'Monthly')\" id=\"monthlyTabLabel\"><\/button>\r\n    <\/div>\r\n    <p id=\"donationImpactText\">\r\n        <span id=\"donationImpactPrefix\"><\/span> <span><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewBox=\"0 0 384 512\" width=\"20px\" height=\"20px\"><path d=\"M214.6 41.4c-12.5-12.5-32.8-12.5-45.3 0l-160 160c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L160 141.2 160 448c0 17.7 14.3 32 32 32s32-14.3 32-32l0-306.7L329.4 246.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3l-160-160z\" fill=\"#ff5515\"\/><\/svg><\/span>\r\n    <\/p>\r\n    <div class=\"amount-buttons\" id=\"amountButtonsContainer\">\r\n        <!-- Buttons will be dynamically generated here by JavaScript -->\r\n    <\/div>\r\n    <div>\r\n        <input type=\"number\" id=\"customAmount\" placeholder=\"\" min=\"20\" oninput=\"updateCustomAmount()\">\r\n    <\/div>\r\n    <p class=\"note\" id=\"donationNote\"><\/p>\r\n    <button class=\"donate-btn\" onclick=\"submitDonation()\" id=\"donateButtonLabel\"><\/button>\r\n<\/div>\r\n\r\n<!-- Custom Message Box HTML -->\r\n<div id=\"customMessageBox\">\r\n    <p id=\"customMessageBoxText\"><\/p>\r\n    <button onclick=\"document.getElementById('customMessageBox').style.display = 'none';\">OK<\/button>\r\n<\/div>\r\n\r\n<script>\r\n    let selectedTab = \"42315\"; \/\/ Default Thai one-time product ID\r\n    let selectedAmount = 1000; \/\/ Default selected amount\r\n    let selectedContent = \"One time\"; \/\/ Tracks current tab content (e.g., \"One time\", \"Monthly\")\r\n    let customAmount = null; \/\/ Stores custom entered amount\r\n    \/\/ Retrieves current language from PHP, defaults to empty string if PHP filter is not available\r\n    let currentLanguage = \"en\";\r\n\r\n    \/\/ Define preset amounts for one-time and monthly donations\r\n    const oneTimeAmounts = [5000, 3000, 1000];\r\n    const monthlyAmounts = [1000, 600, 400];\r\n\r\n    \/\/ Define minimum donation amounts for one-time and monthly\r\n    const oneTimeMin = 1000;\r\n    const monthlyMinDisplayed = 400; \/\/ Visible minimum for monthly\r\n    const monthlyMinInternal = 300; \/\/ Hidden minimum for monthly validation\r\n\r\n    let currentMinDonation = oneTimeMin; \/\/ Tracks the current minimum donation for display (placeholder\/error message)\r\n\r\n    \/\/ Event listener for when the DOM is fully loaded\r\n    document.addEventListener('DOMContentLoaded', function() {\r\n        \/\/ Initialize the tab and amounts by simulating a click on the \"One time\" tab\r\n        const oneTimeTabButton = document.getElementById('oneTimeTabLabel');\r\n        switchTab(oneTimeTabButton, '42315', 'One time');\r\n\r\n        \/\/ Update all static text elements based on the current language\r\n        updateTextByLanguage();\r\n\r\n        \/\/ Clear any stale ecommerce data before pushing new data\r\n        dataLayer.push({ ecommerce: null });\r\n\r\n        \/\/ Fire 'view_item' event for Google Tag Manager (GTM)\r\n        dataLayer.push({\r\n            event: 'view_item',\r\n            ecommerce: {\r\n                items: [{\r\n                    item_id: selectedTab,\r\n                    item_name: 'Mostneeded',\r\n                    price: selectedAmount,\r\n                    item_category: 'Donation',\r\n                    sku: '777'\r\n                }]\r\n            }\r\n        });\r\n    });\r\n\r\n    \/**\r\n     * Updates text content of various elements based on the current language and tab selection.\r\n     *\/\r\n    function updateTextByLanguage() {\r\n        \/\/ Update tab labels\r\n        document.getElementById(\"oneTimeTabLabel\").textContent = currentLanguage === \"en\" ? \"One time\" : \"\u0e23\u0e32\u0e22\u0e04\u0e23\u0e31\u0e49\u0e07\";\r\n        document.getElementById(\"monthlyTabLabel\").textContent = currentLanguage === \"en\" ? \"Monthly\" : \"\u0e23\u0e32\u0e22\u0e40\u0e14\u0e37\u0e2d\u0e19\";\r\n\r\n        \/\/ Update the donation impact prefix based on the selected content\r\n        if (selectedContent === \"Monthly\") {\r\n            document.getElementById(\"donationImpactPrefix\").textContent = currentLanguage === \"en\" ? \"You help will be sustainable\" : \"\u0e17\u0e48\u0e32\u0e19\u0e2a\u0e32\u0e21\u0e32\u0e23\u0e16\u0e0a\u0e48\u0e27\u0e22\u0e40\u0e2b\u0e25\u0e37\u0e2d\u0e40\u0e14\u0e47\u0e01\u0e44\u0e14\u0e49\u0e2d\u0e22\u0e48\u0e32\u0e07\u0e22\u0e31\u0e48\u0e07\u0e22\u0e37\u0e19\";\r\n        } else { \/\/ For \"One time\" tab\r\n            document.getElementById(\"donationImpactPrefix\").textContent = currentLanguage === \"en\" ? \"Donate monthly to create a greater impact\" : \"\u0e1a\u0e23\u0e34\u0e08\u0e32\u0e04\u0e23\u0e32\u0e22\u0e40\u0e14\u0e37\u0e2d\u0e19\u0e40\u0e1e\u0e37\u0e48\u0e2d\u0e2a\u0e23\u0e49\u0e32\u0e07\u0e1c\u0e25\u0e01\u0e23\u0e30\u0e17\u0e1a\u0e2d\u0e31\u0e19\u0e22\u0e34\u0e48\u0e07\u0e43\u0e2b\u0e0d\u0e48\";\r\n        }\r\n\r\n        \/\/ Update the placeholder text and minimum attribute for the custom amount input\r\n        const customAmountInput = document.getElementById(\"customAmount\");\r\n        customAmountInput.placeholder = currentLanguage === \"en\" ? `Or enter your donation amount (min ${currentMinDonation}.-) THB` : `\u0e2b\u0e23\u0e37\u0e2d\u0e23\u0e30\u0e1a\u0e38\u0e08\u0e33\u0e19\u0e27\u0e19\u0e40\u0e07\u0e34\u0e19\u0e1a\u0e23\u0e34\u0e08\u0e32\u0e04 (\u0e02\u0e31\u0e49\u0e19\u0e15\u0e48\u0e33 ${currentMinDonation}.-) \u0e1a\u0e32\u0e17`;\r\n        customAmountInput.min = currentMinDonation; \/\/ Ensure the HTML min attribute is also updated\r\n\r\n        \/\/ Update other static text elements\r\n        document.getElementById(\"donationNote\").textContent = currentLanguage === \"en\" ? \"Share and give with love to World Vision\" : \"\u0e23\u0e48\u0e27\u0e21\u0e41\u0e1a\u0e48\u0e07\u0e1b\u0e31\u0e19\u0e41\u0e25\u0e30\u0e43\u0e2b\u0e49\u0e01\u0e31\u0e1a\u0e28\u0e38\u0e20\u0e19\u0e34\u0e21\u0e34\u0e15 \u0e2a\u0e48\u0e07\u0e15\u0e48\u0e2d\u0e14\u0e49\u0e27\u0e22\u0e2b\u0e31\u0e27\u0e43\u0e08\";\r\n        document.getElementById(\"donateButtonLabel\").textContent = currentLanguage === \"en\" ? \"Donate Now\" : \"\u0e1a\u0e23\u0e34\u0e08\u0e32\u0e04\u0e17\u0e31\u0e19\u0e17\u0e35\";\r\n    }\r\n\r\n    \/**\r\n     * Switches between \"One time\" and \"Monthly\" donation tabs.\r\n     * Dynamically updates the displayed amount buttons and minimum donation.\r\n     * @param {HTMLElement} button - The clicked tab button element.\r\n     * @param {string} tab - The product ID associated with the tab (e.g., '34771', '34772').\r\n     * @param {string} content - The type of donation ('One time' or 'Monthly').\r\n     *\/\r\n    function switchTab(button, tab, content) {\r\n        \/\/ Remove 'active' class from all tab buttons\r\n        document.querySelectorAll('.tab-btn').forEach(btn => btn.classList.remove('active'));\r\n        \/\/ Add 'active' class to the clicked button\r\n        button.classList.add('active');\r\n        selectedContent = content; \/\/ Update the selected content type\r\n\r\n        const amountButtonsContainer = document.getElementById('amountButtonsContainer');\r\n        amountButtonsContainer.innerHTML = ''; \/\/ Clear existing amount buttons\r\n\r\n        let amountsToDisplay = [];\r\n        \/\/ Determine which set of amounts and minimum to use based on the selected tab\r\n        if (selectedContent === \"Monthly\") {\r\n            amountsToDisplay = monthlyAmounts;\r\n            currentMinDonation = monthlyMinDisplayed; \/\/ Use displayed minimum for monthly\r\n            \/\/ Set the correct product ID for monthly donations based on language\r\n            selectedTab = currentLanguage === \"en\" ? \"42316\" : \"42316\";\r\n        } else { \/\/ \"One time\" tab\r\n            amountsToDisplay = oneTimeAmounts;\r\n            currentMinDonation = oneTimeMin; \/\/ Use one-time minimum\r\n            \/\/ Set the correct product ID for one-time donations based on language\r\n            selectedTab = currentLanguage === \"en\" ? \"42315\" : \"42315\";\r\n        }\r\n\r\n        \/\/ Generate new amount buttons dynamically\r\n        amountsToDisplay.forEach((amount, index) => {\r\n            const btn = document.createElement('button');\r\n            btn.classList.add('amount-btn');\r\n            if (index === 0) { \/\/ Make the first button active by default for the new tab\r\n                btn.classList.add('active');\r\n                selectedAmount = amount; \/\/ Set the selected amount to the first one in the array\r\n            }\r\n            btn.textContent = amount;\r\n            \/\/ Attach click event listener to select the amount\r\n            btn.onclick = () => selectAmount(btn, amount);\r\n            amountButtonsContainer.appendChild(btn);\r\n        });\r\n\r\n        \/\/ Clear the custom amount input and reset the customAmount variable when switching tabs\r\n        document.getElementById('customAmount').value = '';\r\n        customAmount = null;\r\n\r\n        \/\/ Update placeholder text and min attribute for custom amount input based on the new tab\r\n        updateTextByLanguage();\r\n    }\r\n\r\n    \/**\r\n     * Selects a predefined donation amount.\r\n     * @param {HTMLElement} button - The clicked amount button element.\r\n     * @param {number} amount - The selected donation amount.\r\n     *\/\r\n    function selectAmount(button, amount) {\r\n        \/\/ Remove 'active' class from all amount buttons\r\n        document.querySelectorAll('.amount-btn').forEach(btn => btn.classList.remove('active'));\r\n        \/\/ Add 'active' class to the clicked button\r\n        button.classList.add('active');\r\n        \/\/ Clear the custom amount input field\r\n        document.getElementById('customAmount').value = '';\r\n        selectedAmount = amount; \/\/ Update the selected amount\r\n        customAmount = null; \/\/ Reset custom amount\r\n    }\r\n\r\n    \/**\r\n     * Updates the custom amount variable when the user types into the input field.\r\n     *\/\r\n    function updateCustomAmount() {\r\n        \/\/ Remove 'active' class from all predefined amount buttons\r\n        document.querySelectorAll('.amount-btn').forEach(btn => btn.classList.remove('active'));\r\n        \/\/ Update customAmount with the value from the input field\r\n        customAmount = document.getElementById('customAmount').value;\r\n    }\r\n\r\n    \/**\r\n     * Generates a random security token of a specified length.\r\n     * @param {number} length - The desired length of the token.\r\n     * @returns {string} The generated security token.\r\n     *\/\r\n    function generateSecurityToken(length) {\r\n        const characters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';\r\n        let token = '';\r\n        for (let i = 0; i < length; i++) {\r\n            token += characters.charAt(Math.floor(Math.random() * characters.length));\r\n        }\r\n        return token;\r\n    }\r\n\r\n    \/**\r\n     * Handles the donation submission process.\r\n     * Validates the amount, pushes data to GTM, and redirects to the checkout URL.\r\n     *\/\r\n    function submitDonation() {\r\n        let amount;\r\n        let selAmount = selectedAmount;\r\n\r\n        \/\/ Determine the final donation amount (custom or predefined)\r\n        if (customAmount) {\r\n            amount = parseInt(customAmount);\r\n            selAmount = \"\";\r\n        } else {\r\n            amount = selectedAmount;\r\n        }\r\n\r\n        \/\/ Determine the actual minimum for validation\r\n        let validationMin = currentMinDonation; \/\/ Default to the displayed minimum\r\n        if (selectedContent === \"Monthly\") {\r\n            validationMin = monthlyMinInternal; \/\/ Use the hidden internal minimum for monthly\r\n        }\r\n\r\n        \/\/ Validate the donation amount against the determined minimum\r\n        if (amount < validationMin) {\r\n            \/\/ The message still refers to the displayed minimum (400 for monthly)\r\n            const message = currentLanguage === \"en\" ? `Minimum donation is ${currentMinDonation} THB.` : `\u0e02\u0e31\u0e49\u0e19\u0e15\u0e48\u0e33\u0e43\u0e19\u0e01\u0e32\u0e23\u0e1a\u0e23\u0e34\u0e08\u0e32\u0e04\u0e04\u0e37\u0e2d ${currentMinDonation} \u0e1a\u0e32\u0e17`;\r\n            showCustomMessageBox(message);\r\n            return;\r\n        }\r\n\r\n        \/\/ Push 'add_to_cart' event to GTM\r\n        dataLayer.push({\r\n            event: 'add_to_cart',\r\n            ecommerce: {\r\n                currency: 'THB',\r\n                value: amount,\r\n                items: [{\r\n                    item_id: selectedTab,\r\n                    item_name: 'Mostneeded',\r\n                    price: selectedAmount,\r\n                    item_category: 'Donation',\r\n                    sku: '777',\r\n                    quantity: 1\r\n                }]\r\n            }\r\n        });\r\n\r\n        \/\/ Prepare URL parameters for checkout\r\n        const securityToken = generateSecurityToken(10);\r\n        const variation_id = selectedTab;\r\n        const frequency = selectedContent;\r\n        let checkoutUrl = `https:\/\/worldvision.or.th\/checkout\/?action=wcdp_ajax_donation_calculation&security=${securityToken}&postid=42304&donation-amount=${selAmount}&wcdp-donation-amount=${amount}&variation_id=${variation_id}&freq=${frequency}&attribute_freq=${frequency}&quantity=1&attribute_wcdp_donation_amount=${amount}`;\r\n\r\n        \/\/ Adjust checkout URL for English language\r\n        if (currentLanguage === \"en\") {\r\n            checkoutUrl = `https:\/\/worldvision.or.th\/en\/checkout\/?action=wcdp_ajax_donation_calculation&security=${securityToken}&postid=42304&donation-amount=${selAmount}&wcdp-donation-amount=${amount}&variation_id=${variation_id}&freq=${frequency}&attribute_freq=${frequency}&quantity=1&attribute_wcdp_donation_amount=${amount}`;\r\n        }\r\n\r\n        \/\/ Introduce a slight delay to ensure GTM can pick up the push event before redirection\r\n        setTimeout(() => {\r\n            window.location.href = checkoutUrl;\r\n        }, 100);\r\n    }\r\n\r\n    \/**\r\n     * Displays a custom message box to the user.\r\n     * @param {string} message - The message to be displayed.\r\n     *\/\r\n    function showCustomMessageBox(message) {\r\n        let messageBox = document.getElementById('customMessageBox');\r\n        \/\/ Create the message box elements if they don't exist\r\n        if (!messageBox) {\r\n            messageBox = document.createElement('div');\r\n            messageBox.id = 'customMessageBox';\r\n            \/\/ Apply inline styles for the message box\r\n            messageBox.style.cssText = `\r\n                position: fixed;\r\n                top: 50%;\r\n                left: 50%;\r\n                transform: translate(-50%, -50%);\r\n                background-color: white;\r\n                padding: 20px;\r\n                border-radius: 8px;\r\n                box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);\r\n                z-index: 1000;\r\n                text-align: center;\r\n                max-width: 300px;\r\n                font-family: sans-serif;\r\n                color: #111222;\r\n            `;\r\n            const messageText = document.createElement('p');\r\n            messageText.id = 'customMessageBoxText';\r\n            messageBox.appendChild(messageText);\r\n\r\n            const closeButton = document.createElement('button');\r\n            closeButton.textContent = 'OK';\r\n            \/\/ Apply inline styles for the OK button\r\n            closeButton.style.cssText = `\r\n                background-color: #ff5515;\r\n                color: white;\r\n                border: none;\r\n                padding: 8px 15px;\r\n                border-radius: 5px;\r\n                cursor: pointer;\r\n                margin-top: 15px;\r\n            `;\r\n            \/\/ Attach click event to hide the message box\r\n            closeButton.onclick = () => {\r\n                messageBox.style.display = 'none';\r\n            };\r\n            messageBox.appendChild(closeButton);\r\n            document.body.appendChild(messageBox); \/\/ Append to the body\r\n        }\r\n        \/\/ Set the message text and display the message box\r\n        document.getElementById('customMessageBoxText').textContent = message;\r\n        messageBox.style.display = 'block';\r\n    }\r\n<\/script><\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t","protected":false},"excerpt":{"rendered":"<p>Donate to the fund to help children without foster parents. Your help will be transformed into educational equipment, essential items for daily life, and support for developing vulnerable and poor communities to have a better and sustainable life.<\/p>\n","protected":false},"author":5,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"elementor_header_footer","meta":{"_acf_changed":false,"content-type":"","footnotes":""},"class_list":["post-45961","page","type-page","status-publish","hentry","entry"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.5 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>donate-csfund - World Vision Thailand<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/worldvision.or.th\/en\/donate-csfund\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"donate-csfund - World Vision Thailand\" \/>\n<meta property=\"og:description\" content=\"Donate to the fund to help children without foster parents. Your help will be transformed into educational equipment, essential items for daily life, and support for developing vulnerable and poor communities to have a better and sustainable life.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/worldvision.or.th\/en\/donate-csfund\/\" \/>\n<meta property=\"og:site_name\" content=\"World Vision Thailand\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/worldvisionthailand\/\" \/>\n<meta property=\"article:modified_time\" content=\"2025-11-19T10:34:23+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/worldvision.or.th\/wp-content\/uploads\/2025\/04\/mostneeded-cover.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1920\" \/>\n\t<meta property=\"og:image:height\" content=\"1080\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/worldvision.or.th\\\/en\\\/donate-csfund\\\/\",\"url\":\"https:\\\/\\\/worldvision.or.th\\\/en\\\/donate-csfund\\\/\",\"name\":\"donate-csfund - World Vision Thailand\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/worldvision.or.th\\\/en\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/worldvision.or.th\\\/en\\\/donate-csfund\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/worldvision.or.th\\\/en\\\/donate-csfund\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/worldvision.or.th\\\/wp-content\\\/uploads\\\/2025\\\/04\\\/mostneeded-cover.jpg\",\"datePublished\":\"2025-07-29T11:59:33+00:00\",\"dateModified\":\"2025-11-19T10:34:23+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/worldvision.or.th\\\/en\\\/donate-csfund\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/worldvision.or.th\\\/en\\\/donate-csfund\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/worldvision.or.th\\\/en\\\/donate-csfund\\\/#primaryimage\",\"url\":\"https:\\\/\\\/worldvision.or.th\\\/wp-content\\\/uploads\\\/2025\\\/04\\\/mostneeded-cover.jpg\",\"contentUrl\":\"https:\\\/\\\/worldvision.or.th\\\/wp-content\\\/uploads\\\/2025\\\/04\\\/mostneeded-cover.jpg\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/worldvision.or.th\\\/en\\\/donate-csfund\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"donate-csfund\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/worldvision.or.th\\\/en\\\/#website\",\"url\":\"https:\\\/\\\/worldvision.or.th\\\/en\\\/\",\"name\":\"World Vision Thailand\",\"description\":\"\u0e0a\u0e48\u0e27\u0e22\u0e40\u0e2b\u0e25\u0e37\u0e2d\u0e40\u0e14\u0e47\u0e01\u0e22\u0e32\u0e01\u0e44\u0e23\u0e49\u0e43\u0e19\u0e1b\u0e23\u0e30\u0e40\u0e17\u0e28\u0e44\u0e17\u0e22 | \u0e21\u0e39\u0e25\u0e19\u0e34\u0e18\u0e34\u0e28\u0e38\u0e20\u0e19\u0e34\u0e21\u0e34\u0e15\u0e2f\",\"publisher\":{\"@id\":\"https:\\\/\\\/worldvision.or.th\\\/en\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/worldvision.or.th\\\/en\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/worldvision.or.th\\\/en\\\/#organization\",\"name\":\"World Vision Thailand\",\"url\":\"https:\\\/\\\/worldvision.or.th\\\/en\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/worldvision.or.th\\\/en\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/worldvision.or.th\\\/wp-content\\\/uploads\\\/2025\\\/10\\\/cropped-logo.png\",\"contentUrl\":\"https:\\\/\\\/worldvision.or.th\\\/wp-content\\\/uploads\\\/2025\\\/10\\\/cropped-logo.png\",\"width\":1182,\"height\":618,\"caption\":\"World Vision Thailand\"},\"image\":{\"@id\":\"https:\\\/\\\/worldvision.or.th\\\/en\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/worldvisionthailand\\\/\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"donate-csfund - World Vision Thailand","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/worldvision.or.th\/en\/donate-csfund\/","og_locale":"en_US","og_type":"article","og_title":"donate-csfund - World Vision Thailand","og_description":"Donate to the fund to help children without foster parents. Your help will be transformed into educational equipment, essential items for daily life, and support for developing vulnerable and poor communities to have a better and sustainable life.","og_url":"https:\/\/worldvision.or.th\/en\/donate-csfund\/","og_site_name":"World Vision Thailand","article_publisher":"https:\/\/www.facebook.com\/worldvisionthailand\/","article_modified_time":"2025-11-19T10:34:23+00:00","og_image":[{"width":1920,"height":1080,"url":"https:\/\/worldvision.or.th\/wp-content\/uploads\/2025\/04\/mostneeded-cover.jpg","type":"image\/jpeg"}],"twitter_card":"summary_large_image","schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/worldvision.or.th\/en\/donate-csfund\/","url":"https:\/\/worldvision.or.th\/en\/donate-csfund\/","name":"donate-csfund - World Vision Thailand","isPartOf":{"@id":"https:\/\/worldvision.or.th\/en\/#website"},"primaryImageOfPage":{"@id":"https:\/\/worldvision.or.th\/en\/donate-csfund\/#primaryimage"},"image":{"@id":"https:\/\/worldvision.or.th\/en\/donate-csfund\/#primaryimage"},"thumbnailUrl":"https:\/\/worldvision.or.th\/wp-content\/uploads\/2025\/04\/mostneeded-cover.jpg","datePublished":"2025-07-29T11:59:33+00:00","dateModified":"2025-11-19T10:34:23+00:00","breadcrumb":{"@id":"https:\/\/worldvision.or.th\/en\/donate-csfund\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/worldvision.or.th\/en\/donate-csfund\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/worldvision.or.th\/en\/donate-csfund\/#primaryimage","url":"https:\/\/worldvision.or.th\/wp-content\/uploads\/2025\/04\/mostneeded-cover.jpg","contentUrl":"https:\/\/worldvision.or.th\/wp-content\/uploads\/2025\/04\/mostneeded-cover.jpg"},{"@type":"BreadcrumbList","@id":"https:\/\/worldvision.or.th\/en\/donate-csfund\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home"},{"@type":"ListItem","position":2,"name":"donate-csfund"}]},{"@type":"WebSite","@id":"https:\/\/worldvision.or.th\/en\/#website","url":"https:\/\/worldvision.or.th\/en\/","name":"World Vision Thailand","description":"\u0e0a\u0e48\u0e27\u0e22\u0e40\u0e2b\u0e25\u0e37\u0e2d\u0e40\u0e14\u0e47\u0e01\u0e22\u0e32\u0e01\u0e44\u0e23\u0e49\u0e43\u0e19\u0e1b\u0e23\u0e30\u0e40\u0e17\u0e28\u0e44\u0e17\u0e22 | \u0e21\u0e39\u0e25\u0e19\u0e34\u0e18\u0e34\u0e28\u0e38\u0e20\u0e19\u0e34\u0e21\u0e34\u0e15\u0e2f","publisher":{"@id":"https:\/\/worldvision.or.th\/en\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/worldvision.or.th\/en\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/worldvision.or.th\/en\/#organization","name":"World Vision Thailand","url":"https:\/\/worldvision.or.th\/en\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/worldvision.or.th\/en\/#\/schema\/logo\/image\/","url":"https:\/\/worldvision.or.th\/wp-content\/uploads\/2025\/10\/cropped-logo.png","contentUrl":"https:\/\/worldvision.or.th\/wp-content\/uploads\/2025\/10\/cropped-logo.png","width":1182,"height":618,"caption":"World Vision Thailand"},"image":{"@id":"https:\/\/worldvision.or.th\/en\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/worldvisionthailand\/"]}]}},"_links":{"self":[{"href":"https:\/\/worldvision.or.th\/en\/wp-json\/wp\/v2\/pages\/45961","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/worldvision.or.th\/en\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/worldvision.or.th\/en\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/worldvision.or.th\/en\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/worldvision.or.th\/en\/wp-json\/wp\/v2\/comments?post=45961"}],"version-history":[{"count":0,"href":"https:\/\/worldvision.or.th\/en\/wp-json\/wp\/v2\/pages\/45961\/revisions"}],"wp:attachment":[{"href":"https:\/\/worldvision.or.th\/en\/wp-json\/wp\/v2\/media?parent=45961"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}