Hi
You are using jetpack subscription widget, but there are some limitations when using third party submission forms. At the moment this problem is in jetpack widget side, what doesn’t support redirecting to another page.
I would offer you another solution for redirection, very simplified, but should work. This is universal solution for redirecting from jetpack subscription form, not actually related to Dreamgrow Scroll Triggered Box. Put inside your site somewhere this piece of script (can be inside scrollbox, but not necessarily. Ideally this script should be in page head):
if (location.search === '?subscribe=success') {
window.location = 'http://www.politicoscope.com/newsletter-subscription-confirmation';
}
For Apache web server users it’s even better to achieve this redirect using URL rewriting functionality.
Thanks for the reply.
If I put the script inside Dreamgrow Scroll Triggered Box, do I add in the beginning and end of the code <script> and </script>
Like so:
<script>
if (location.search === ‘?subscribe=success’) {
window.location = ‘http://www.politicoscope.com/newsletter-subscription-confirmation’;
}
</script>
Not a coder, only know a few things.
Thanks
Yes, you must add script tags.
I added there also line what will close box permanently after successful submit (function closeAfterSubmit takes scrollbox div element id as input, in your case it is ‘dgd_scrollbox-4013’). Complete script ready to put inside Scrollbox should be following:
<script type="text/javascript">
if (window.location.search === '?subscribe=success') {
$DGD.closeAfterSubmit('dgd_scrollbox-4013');
window.location.replace('http://www.politicoscope.com/newsletter-subscription-confirmation');
}
</script>
ps. I replaced “window.location = ‘…'” with window.location.replace(‘…’) what should be more correct to use in this case. In this case intermediate page will be not saved in browser history and user can move back to original article with one click to “back” button.
I added the code in the page head. It works!
Great! Now I’m enjoying the Dreamgrow Scroll Triggered Box.
Thanks.