{"product_id":"agile-essentials-you-always-wanted-to-know","title":"Agile Essentials You Always Wanted To Know","description":"\u003cbody\u003e\n    \u003cmeta charset=\"UTF-8\"\u003e\n    \u003cmeta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\"\u003e\n    \u003ctitle\u003eResource Form\u003c\/title\u003e\n    \u003clink href=\"https:\/\/fonts.googleapis.com\/css2?family=Poppins:wght@400;500;600\u0026amp;display=swap\" rel=\"stylesheet\"\u003e\n\n\n    \u003c!-- Success Message Overlay --\u003e\n     \u003cdiv id=\"successMessage\" style=\"display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(0, 0, 0, 0.5); z-index: 1000; justify-content: center; align-items: center;\"\u003e\n        \u003cdiv style=\"background-color: #fff; padding: 20px; border-radius: 8px; text-align: center; max-width: 600px; width: 90%; margin: 30px;\"\u003e\n            \u003cp style=\"font-size: 16px; color: #1f4569; font-family: 'Poppins', Arial, sans-serif;\"\u003eCongratulations! Your request for the resource is complete. Please check your inbox to access it now.\u003c\/p\u003e\n            \u003cbutton onclick=\"closeMessage()\" style=\"background-color: #1f4569; color: #fff; border: none; padding: 10px 20px; border-radius: 8px; cursor: pointer; font-family: 'Poppins', Arial, sans-serif; font-size: 15px; margin-top: 15px;\"\u003eClose\u003c\/button\u003e\n        \u003c\/div\u003e\n    \u003c\/div\u003e\n\n    \u003c!-- Form Container --\u003e\n    \u003cdiv class=\"contact-container\" style=\"background-color: #e7f3ff; border: 1px solid #c3e0ff; border-radius: 8px; padding: 20px; max-width: 500px; margin: auto; margin-bottom: 20px;\"\u003e\n        \u003ch5 style=\"font-size: 17px; font-weight: 400; margin-bottom: 15px; color: #1f4569; text-align: left; font-family: 'Poppins', Arial, sans-serif;\"\u003eRequest Sample Book\/Online Resource\u003c\/h5\u003e\n        \u003cform id=\"resourceForm\" onsubmit=\"submitForm(event)\" style=\"display: flex; flex-direction: column; gap: 10px; margin-top: 20px;\"\u003e\n            \u003cdiv class=\"form-group\" style=\"display: flex; align-items: center; gap: 10px; margin-bottom: 10px; flex-wrap: wrap;\"\u003e\n                \u003clabel for=\"email\" style=\"font-size: 16px; font-family: 'Poppins', Arial, sans-serif; width: 100px;\"\u003eEmail:\u003c\/label\u003e\n                \u003cinput required name=\"email\" id=\"email\" type=\"email\" style=\"padding: 10px; border: 1px solid #c3e0ff; border-radius: 4px; font-family: 'Poppins', Arial, sans-serif; max-width: 300px; flex: 1; box-sizing: border-box; width: 100%;\"\u003e\n            \u003c\/div\u003e\n            \u003cdiv class=\"form-group\" style=\"display: flex; align-items: center; gap: 10px; margin-bottom: 10px; flex-wrap: wrap;\"\u003e\n                \u003clabel for=\"resourcetype\" style=\"font-size: 16px; font-family: 'Poppins', Arial, sans-serif; width: 100px;\"\u003eResource Type:\u003c\/label\u003e\n                \u003cselect required name=\"resourcetype\" id=\"resourcetype\" style=\"padding: 10px; border: 1px solid #c3e0ff; border-radius: 4px; font-family: 'Poppins', Arial, sans-serif; max-width: 300px; flex: 1; box-sizing: border-box; width: 100%;\"\u003e\n                    \u003coption selected disabled value=\"\"\u003e\u003c\/option\u003e\n                    \u003coption value=\"samplebook\"\u003eSample Book\u003c\/option\u003e\n                    \u003coption value=\"onlineresource\"\u003eOnline Resource\u003c\/option\u003e\n                \u003c\/select\u003e\n            \u003c\/div\u003e\n            \u003cdiv class=\"form-group\" style=\"display: flex; align-items: center; gap: 10px; margin-bottom: 10px; flex-wrap: wrap;\"\u003e\n                \u003clabel for=\"bookname\" style=\"font-size: 16px; font-family: 'Poppins', Arial, sans-serif; width: 100px;\"\u003eBook Name:\u003c\/label\u003e\n                \u003cinput required name=\"bookname\" id=\"bookname\" type=\"text\" readonly value=\"Agile Essentials You Always Wanted To Know\" style=\"padding: 10px; border: 1px solid #c3e0ff; border-radius: 4px; font-family: 'Poppins', Arial, sans-serif; max-width: 300px; flex: 1; box-sizing: border-box; width: 100%;\"\u003e\n            \u003c\/div\u003e\n            \u003cdiv style=\"display: flex; justify-content: center; width: 100%;\"\u003e\n                \u003cbutton type=\"submit\" id=\"submitButton\" style=\"background-color: #1f4569; color: #fff; border: none; padding: 10px 20px; border-radius: 8px; cursor: pointer; font-family: 'Poppins', Arial, sans-serif; font-size: 15px; width: 130px; box-sizing: border-box;\"\u003eSubmit\u003c\/button\u003e\n            \u003c\/div\u003e\n        \u003c\/form\u003e\n    \u003c\/div\u003e\n\n    \u003cscript\u003e\n        async function submitForm(event) {\n            event.preventDefault();\n            const email = document.getElementById('email').value;\n            const resourcetype = document.getElementById('resourcetype').value;\n            const bookname = document.getElementById('bookname').value;\n            const submitButton = document.getElementById('submitButton');\n\n            \/\/ Disable the submit button\n            submitButton.disabled = true;\n            submitButton.style.backgroundColor = '#c3c3c3';\n\n            const url = `https:\/\/script.google.com\/macros\/s\/AKfycbwDwUD1iCc4-9kH_-Q6tewyt_NicWVVHXuu8Hz9EVrvKaj1nIp7D_QQ5DYYlvEZRX6Dzw\/exec?email=${encodeURIComponent(email)}\u0026resourcetype=${encodeURIComponent(resourcetype)}\u0026bookname=${encodeURIComponent(bookname)}`;\n\n            try {\n                const response = await fetch(url, {\n                    method: 'GET',\n                    mode: 'cors'\n                });\n\n                if (!response.ok) {\n                    throw new Error('Network response was not ok');\n                }\n\n                const data = await response.json();\n\n                if (data.result === 'success') {\n                    showMessage();\n                    document.getElementById('resourceForm').reset();\n                } else {\n                    throw new Error(data.message);\n                }\n            } catch (error) {\n                console.error('Error:', error);\n                alert('There was an issue submitting the data: ' + error.message);\n                \/\/ Re-enable the submit button if there was an error\n                submitButton.disabled = false;\n                submitButton.style.backgroundColor = '#1f4569';\n            }\n        }\n\n        function showMessage() {\n            document.getElementById('successMessage').style.display = 'flex';\n        }\n\t\n        function closeMessage() {\n            document.getElementById('successMessage').style.display = 'none';\n\n            \/\/ Re-enable the submit button when the message is closed\n            const submitButton = document.getElementById('submitButton');\n            submitButton.disabled = false;\n            submitButton.style.backgroundColor = '#1f4569';\n        }\n    \u003c\/script\u003e\n\n\n\u003c\/body\u003e","brand":"Vibrant Publishers","offers":[{"title":"Paperback","offer_id":43883259592747,"sku":"9781636510057","price":490.0,"currency_code":"INR","in_stock":true},{"title":"eBook (Cheapest)","offer_id":43305167749163,"sku":"9781636510064","price":399.0,"currency_code":"INR","in_stock":true},{"title":"Hardcover (Color Edition)","offer_id":43883259625515,"sku":"9781636510071","price":6964.0,"currency_code":"INR","in_stock":true}],"thumbnail_url":"\/\/cdn.shopify.com\/s\/files\/1\/0673\/0789\/6875\/files\/1_94c1bdeb-e5c7-403d-98fd-5c7cb66f72bc.jpg?v=1775281334","url":"https:\/\/www.vibrantpublishers.in\/products\/agile-essentials-you-always-wanted-to-know","provider":"Vibrant Publishers India","version":"1.0","type":"link"}