Anyone willing to share AJAX script to subscribe users?
When a user subscribes, it takes them to a congrats page saying 'You're subscribed!'
From this thread http://sendy.co/discussion/565/subscribe-success-page-redirect-page-to-previous-page#Item_3
I understand I could use some AJAX to redirect users back to the home page. Being a complete novice to ajax and thinking it's a small miracle that I proudly got Sendy working, installed DNS records and domain keys on my server, I thought i would turn to you guys who may be doing something similar!?
Any code someone is willing to share?
This discussion has been closed.
Comments
Hi @yousendme,
You don't need AJAX to redirect users back to your homepage.
Just set the custom URL you want to redirect users to after they subscribe in your list settings.
Thanks.
Ben
I've tried that but when a user subscribes it doesn't go to the success page and then back to the home page. The page just refreshes and doesn't give an indication the user is subscribed. I would like it to go to the mydomain.com/sendy/subscribe
page first to indicate it was successful and then redirect elsewhere
Hi @yousendme,
Are you using the subscribe form HTML code?
Ben
Yep
@yousendme,
If you use the subscribe form HTML code on your website, upon user subscribe, they will be brought to the "You're subscribed" page. Is that not the case for you?
I went to your website to subscribe to your list and it works.
If you want the user to be brought to a 'success page', then back to the 'home page', you will need to code a page (lets call it thankyou.html) that says "You're subscribed" then use javascript to delay for a few seconds before redirecting to the home page.
Then use http://your_website/thankyou.html as your custom redirection URL in your list settings.
Thanks.
Ben
@yousendme,
I have written the
thankyou.html
script for you. Download it at http://cl.ly/MRryChange the variables if necessary:
Upload this file in Sendy's main directory. So the URL will be http://your_sendy_installation_url/thankyou.html.
Then use this URL as the Subscribe success page in your list settings of your preferred list.
Thanks.
Ben