{"id":16,"date":"2026-03-16T19:04:19","date_gmt":"2026-03-16T19:04:19","guid":{"rendered":"https:\/\/graindiscovery.aghost.net\/firsttrustandsavingsbank\/?page_id=16"},"modified":"2026-03-16T19:52:27","modified_gmt":"2026-03-16T19:52:27","slug":"dtn-weather","status":"publish","type":"page","link":"https:\/\/graindiscovery.aghost.net\/firsttrustandsavingsbank\/dtn-weather\/","title":{"rendered":"DTN Weather"},"content":{"rendered":"\n<div class=\"wp-block-group has-global-padding is-layout-constrained wp-block-group-is-layout-constrained\">\n<div style=\"height:32px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<div class=\"wp-block-dtn-weather-current-conditions\">\n    <div style=\"margin-bottom: 10px;padding-left:16px;\">\n        <input type=\"text\" id=\"dtn-weather-current-conditions-widget-6ac42afcefc1c-zipcode\" value=\"60970\" placeholder=\"Enter zipcode\" aria-label=\"Enter zip code for search\" \/>\n        <button id=\"dtn-weather-current-conditions-widget-6ac42afcefc1c-update\" class=\"wp-block-dtn-weather-current-conditions-search\">SEARCH<\/button>\n    <\/div>\n    <div id=\"dtn-weather-current-conditions-widget-6ac42afcefc1c\" data-default-zip=\"60970\"><\/div>\n\n\t<script type=\"text\/javascript\">\n\t\t(function() {\n\t\t\tconst \twidgetId = 'dtn-weather-current-conditions-widget-6ac42afcefc1c',\n\t\t\t\t\tzipInput = document.getElementById(widgetId + '-zipcode'),\n\t\t\t\t\tupdateBtn = document.getElementById(widgetId + '-update'),\n\t\t\t\t\twidgetContainer = document.getElementById(widgetId),\n\t\t\t\t\tdefaultZip = widgetContainer.getAttribute('data-default-zip'),\n\t\t\t\t\tcookieName = 'dtn_weather_zipcode';\n\n\t\t\tfunction initWidget(zipCode) {\n\t\t\t\tloadScriptOnce('https:\/\/agproducer.prd.ag.zones.dtn.com\/weather\/current-conditions\/dtn-wx-current-conditions-ui.bundle.js')\n\t\t\t\t.then(() => {\n\t\t\t\t\twindow.initCurrentConditionsWidget(widgetId, {\n\t\t\t\t\t\tlatitude: \"\",\n\t\t\t\t\t\tlongitude: \"\",\n\t\t\t\t\t\tzipCode: zipCode,\n\t\t\t\t\t\tunits: \"us-std\"\n\t\t\t\t\t});\n\t\t\t\t})\n\t\t\t\t.catch(error => {\n\t\t\t\t\tconsole.error('Error during script loading:', error);\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tconst savedZip = getCookieDTN(cookieName) || defaultZip;\n\t\t\tzipInput.value = savedZip;\n\t\t\tinitWidget(savedZip);\n\n\t\t\tupdateBtn.addEventListener('click', function() {\n\t\t\t\tconst newZip = zipInput.value.trim();\n\t\t\t\tif (newZip) {\n\t\t\t\t\tsetCookieDTN(cookieName, newZip);\n\t\t\t\t\twidgetContainer.innerHTML = '';\n\t\t\t\t\tinitWidget(newZip);\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tzipInput.addEventListener('keypress', function(e) {\n\t\t\t\tif (e.key === 'Enter') {\n\t\t\t\t\tupdateBtn.click();\n\t\t\t\t}\n\t\t\t});\n\t\t})();\n    <\/script>\n<\/div>\n\n\n\n<div style=\"height:37px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<div class=\"wp-block-twentytwentyfour-five-day-forecast\">\n    <div style=\"margin-bottom: 10px;padding-left:32px;\">\n        <input type=\"text\" id=\"dtn-five-day-forecast-widget-6ac42afcefcde-zipcode\" value=\"60970\" placeholder=\"Enter zipcode\" aria-label=\"Enter zip code for search\" \/>\n        <button id=\"dtn-five-day-forecast-widget-6ac42afcefcde-update\" class=\"wp-block-dtn-five-day-forecast-widget-search\">SEARCH<\/button>\n    <\/div>\n    <div id=\"dtn-five-day-forecast-widget-6ac42afcefcde\" data-default-zip=\"60970\"><\/div>\n    <script type=\"text\/javascript\">\n        (function() {\n            const \twidgetId = 'dtn-five-day-forecast-widget-6ac42afcefcde',\n\t\t\t\t\tzipInput = document.getElementById(widgetId + '-zipcode'),\n\t\t\t\t\tupdateBtn = document.getElementById(widgetId + '-update'),\n\t\t\t\t\twidgetContainer = document.getElementById(widgetId),\n\t\t\t\t\tdefaultZip = widgetContainer.getAttribute('data-default-zip'),\n\t\t\t\t\tcookieName = 'dtn_weather_zipcode';\n\n            function initWidget(zipCode) {\n                loadScriptOnce('https:\/\/agproducer.prd.ag.zones.dtn.com\/weather\/ten-day-forecast\/dtn-wx-ten-day-forecast.bundle.js')\n                .then(() => {\n                    if (window.initWxTenDayForecastWidget) {\n                        window.initWxTenDayForecastWidget(widgetId, {\n                            latitude: \"\",\n                            longitude: \"\",\n                            zipCode: zipCode,\n                            units: \"us-std\",\n                            displayDays: \"5\"\n                        });\n                    }\n                })\n                .catch(error => {\n                    console.error('Error during script loading:', error);\n                });\n            }\n\n            const savedZip = getCookieDTN(cookieName) || defaultZip;\n            zipInput.value = savedZip;\n            initWidget(savedZip);\n\n            updateBtn.addEventListener('click', function() {\n                const newZip = zipInput.value.trim();\n                if (newZip) {\n                    setCookieDTN(cookieName, newZip);\n                    widgetContainer.innerHTML = '';\n                    initWidget(newZip);\n                }\n            });\n\n            zipInput.addEventListener('keypress', function(e) {\n                if (e.key === 'Enter') {\n                    updateBtn.click();\n                }\n            });\n        })();\n    <\/script>\n<\/div>\n<\/div>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n","protected":false},"excerpt":{"rendered":"","protected":false},"author":7,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_acf_changed":false,"footnotes":""},"class_list":["post-16","page","type-page","status-publish","hentry"],"acf":[],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/graindiscovery.aghost.net\/firsttrustandsavingsbank\/wp-json\/wp\/v2\/pages\/16","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/graindiscovery.aghost.net\/firsttrustandsavingsbank\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/graindiscovery.aghost.net\/firsttrustandsavingsbank\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/graindiscovery.aghost.net\/firsttrustandsavingsbank\/wp-json\/wp\/v2\/users\/7"}],"replies":[{"embeddable":true,"href":"https:\/\/graindiscovery.aghost.net\/firsttrustandsavingsbank\/wp-json\/wp\/v2\/comments?post=16"}],"version-history":[{"count":6,"href":"https:\/\/graindiscovery.aghost.net\/firsttrustandsavingsbank\/wp-json\/wp\/v2\/pages\/16\/revisions"}],"predecessor-version":[{"id":32,"href":"https:\/\/graindiscovery.aghost.net\/firsttrustandsavingsbank\/wp-json\/wp\/v2\/pages\/16\/revisions\/32"}],"wp:attachment":[{"href":"https:\/\/graindiscovery.aghost.net\/firsttrustandsavingsbank\/wp-json\/wp\/v2\/media?parent=16"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}