Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <form id="bottomNLTForm" action="#" method="post">
- <label>Like Black Metal ? Feel free to join the Askrinn newsletter for exclusive updates ! </label>
- <input type="text" name="bottomNewsletter" id="bottomNewsletter" value="Your email here" onfocus="this.value='';" />
- <input type="submit" class="boutonFooterSubmit" value="ok" />
- </form>
- <script type="text/javascript">
- $(function() {
- $(".boutonFooterSubmit").click(function()
- {
- var dataString = 'email='+ $("#bottomNewsletter").val();
- $.ajax({
- type: "POST",
- url: "mailinglistFromNews.php",
- data: dataString,
- cache: false,
- success: function(msg){
- switch(msg) {
- case "ok":
- $.msgbox("Thanks a lot for subscribing to the Askrinn mailinglist !", {type: "info"});
- break;
- default:alert('error');
- $.msgbox("An unknown error happened.", {type: "error"});
- break;
- }
- }
- });
- });
- });
- </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement