An error has occurred

{{terminalError}}

var scriptPath = "https://static.advance.net/static/common/js/piano-frame.js"; var script = document.createElement("script"); script.onload = function(e) { function runPiano() { var config = { type: 'inarticle', version: 'cta', placement: 'in-article', newsletterId: '', closable: 'false' }; window.Advance.piano.build(config); } window.Advance.piano.start(runPiano); } script.type = "text/javascript"; script.async = true; script.src = scriptPath; document.head.appendChild(script);
Already a subscriber? Please
pennlive.com logo pennlive.com logo

Already a subscriber?

Please sign in to access your account.

window.addEventListener("message", function (e) { // We verify that the error message is coming from Piano, so it must be what we're looking for. if (typeof e.data.piano !== 'undefined') { // Get the object with the result. var result = e.data.piano; // We know how this object should be structured, so we're checking for the "success" field. // We're expecting it to be false, so we can show an error message. if (result.object.type === 'newsletter') { var inputLabel = document.getElementById('newsletterEmail-label'); var form = document.getElementsByClassName('in-article__main-content--newsletter')[0]; var mainHeadline = document.getElementsByClassName('in-article__main-headline')[0]; var mainTagline = document.getElementsByClassName('in-article__main-tagline')[0]; if (result.success) { // Show success message mainHeadline.textContent = ""; mainTagline.textContent = ""; // Hide form field, button, and any error messages form.style.display = 'none'; } else { // Show error message inputLabel.textContent = result.message; inputLabel.setAttribute('class', 'in-article__form-label'); } } } return; }, false);