{"timeout":1747411754,"value":{"content":"\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-e73eb58 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"e73eb58\" data-element_type=\"section\" data-settings=\"{&quot;jet_parallax_layout_list&quot;:[]}\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-8418b9a\" data-id=\"8418b9a\" data-element_type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-46da0f9 elementor-widget elementor-widget-html\" data-id=\"46da0f9\" data-element_type=\"widget\" data-widget_type=\"html.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<form id=\"country-form\">\r\n    <div class=\"form-group\">\r\n        <label for=\"resident-country\">Select Your Country of Residence:<\/label>\r\n        <select id=\"resident-country\" name=\"resident-country\" class=\"form-control\">\r\n            <option value=\"\">-- Select --<\/option>\r\n            <option value=\"USA\">United States<\/option>\r\n            <option value=\"Canada\">Canada<\/option>\r\n            <option value=\"UK\">United Kingdom<\/option>\r\n        <\/select>\r\n    <\/div>\r\n\r\n    <div class=\"form-group\">\r\n        <label for=\"applying-country\">Select the Country You Want to Apply To:<\/label>\r\n        <select id=\"applying-country\" name=\"applying-country\" class=\"form-control\">\r\n            <option value=\"\">-- Select Resident Country First --<\/option>\r\n        <\/select>\r\n    <\/div>\r\n\r\n    <div class=\"form-group\">\r\n        <a href=\"https:\/\/wa.me\/+971506396374\" id=\"redirect-button\" class=\"disabled\" style=\"display: block; width: 100%; padding: 12px; background: #ccc; color: #fff; border-radius: 4px; font-size: 16px; text-align: center; text-decoration: none; pointer-events: none;\">Proceed<\/a>\r\n    <\/div>\r\n<\/form>\r\n\r\n<script>\r\n  const residentSelect = document.getElementById(\"resident-country\");\r\n  const applyingSelect = document.getElementById(\"applying-country\");\r\n  const redirectButton = document.getElementById(\"redirect-button\");\r\n\r\n  const countryOptions = {\r\n    USA: [\"Canada\", \"UK\"],\r\n    Canada: [\"USA\", \"UK\"],\r\n    UK: [\"USA\", \"Canada\"]\r\n  };\r\n\r\n  residentSelect.addEventListener(\"change\", function () {\r\n    const selected = this.value;\r\n    applyingSelect.innerHTML = '<option value=\"\">-- Select --<\/option>';\r\n\r\n    if (selected && countryOptions[selected]) {\r\n      countryOptions[selected].forEach(country => {\r\n        const option = document.createElement(\"option\");\r\n        option.value = country;\r\n        option.textContent = country;\r\n        applyingSelect.appendChild(option);\r\n      });\r\n    } else {\r\n      applyingSelect.innerHTML = '<option value=\"\">-- Select Resident Country First --<\/option>';\r\n    }\r\n\r\n    checkProceedState();\r\n  });\r\n\r\n  applyingSelect.addEventListener(\"change\", checkProceedState);\r\n\r\n  function checkProceedState() {\r\n    const residentVal = residentSelect.value;\r\n    const applyingVal = applyingSelect.value;\r\n\r\n    if (residentVal && applyingVal) {\r\n      redirectButton.style.background = \"#0073e6\";\r\n      redirectButton.style.pointerEvents = \"auto\";\r\n    } else {\r\n      redirectButton.style.background = \"#ccc\";\r\n      redirectButton.style.pointerEvents = \"none\";\r\n    }\r\n  }\r\n<\/script>\r\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-83770f2 elementor-widget elementor-widget-html\" data-id=\"83770f2\" data-element_type=\"widget\" data-widget_type=\"html.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<script>\r\ndocument.getElementById('resident-country').addEventListener('change', function() {\r\n    const residentCountry = this.value;\r\n    const applyingCountryDropdown = document.getElementById('applying-country');\r\n    const redirectButton = document.getElementById('redirect-button');\r\n\r\n    \/\/ Clear existing options\r\n    applyingCountryDropdown.innerHTML = '<option value=\"\">-- Select --<\/option>';\r\n    redirectButton.disabled = true; \/\/ Disable the button initially\r\n\r\n    \/\/ Define country mappings and links\r\n    const countryMappings = {\r\n        USA: [\r\n            { name: 'Canada', link: 'https:\/\/example.com\/canada' },\r\n            { name: 'Mexico', link: 'https:\/\/example.com\/mexico' },\r\n            { name: 'UK', link: 'https:\/\/example.com\/uk' }\r\n        ],\r\n        Canada: [\r\n            { name: 'USA', link: 'https:\/\/example.com\/usa' },\r\n            { name: 'Mexico', link: 'https:\/\/example.com\/mexico' },\r\n            { name: 'France', link: 'https:\/\/example.com\/france' }\r\n        ],\r\n        UK: [\r\n            { name: 'USA', link: 'https:\/\/example.com\/usa' },\r\n            { name: 'Canada', link: 'https:\/\/example.com\/canada' },\r\n            { name: 'Germany', link: 'https:\/\/example.com\/germany' }\r\n        ],\r\n        \/\/ Add more mappings as needed\r\n    };\r\n\r\n    \/\/ Populate the applying country dropdown\r\n    if (residentCountry && countryMappings[residentCountry]) {\r\n        countryMappings[residentCountry].forEach(country => {\r\n            const option = document.createElement('option');\r\n            option.value = country.link; \/\/ Store the link in the option value\r\n            option.textContent = country.name;\r\n            applyingCountryDropdown.appendChild(option);\r\n        });\r\n    }\r\n});\r\n\r\n\/\/ Add event listener for the applying country dropdown\r\ndocument.getElementById('applying-country').addEventListener('change', function() {\r\n    const redirectButton = document.getElementById('redirect-button');\r\n    if (this.value) {\r\n        redirectButton.disabled = false; \/\/ Enable the button if a country is selected\r\n    } else {\r\n        redirectButton.disabled = true; \/\/ Disable the button if no country is selected\r\n    }\r\n});\r\n\r\n\/\/ Add event listener for the redirect button\r\ndocument.getElementById('redirect-button').addEventListener('click', function() {\r\n    const selectedLink = document.getElementById('applying-country').value;\r\n    if (selectedLink) {\r\n        window.location.href = selectedLink; \/\/ Redirect to the selected link\r\n    }\r\n});\r\n<\/script>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t","scripts":[],"styles":[]}}