Advertisement
Guest User

Untitled

a guest
Feb 19th, 2019
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.47 KB | None | 0 0
  1. <form id="bottomNLTForm" action="#" method="post">
  2. <label>Like Black Metal ? Feel free to join the Askrinn newsletter for exclusive updates ! </label>
  3. <input type="text" name="bottomNewsletter" id="bottomNewsletter" value="Your email here" onfocus="this.value='';" />
  4. <input type="submit" class="boutonFooterSubmit" value="ok" />
  5. </form>
  6. <script type="text/javascript">
  7. $(function() {
  8. $(".boutonFooterSubmit").click(function()
  9. {
  10. var dataString = 'email='+ $("#bottomNewsletter").val();
  11.  
  12. $.ajax({
  13. type: "POST",
  14. url: "mailinglistFromNews.php",
  15. data: dataString,
  16. cache: false,
  17. success: function(msg){
  18. switch(msg) {
  19.  
  20. case "ok":
  21. $.msgbox("Thanks a lot for subscribing to the Askrinn mailinglist !", {type: "info"});
  22. break;
  23.  
  24. default:alert('error');
  25. $.msgbox("An unknown error happened.", {type: "error"});
  26. break;
  27. }
  28. }
  29. });
  30. });
  31.  
  32. });
  33. </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement