url: 'index.php?route=common/footer/mailChimpUnsubscribe', type: 'POST', success: function(data) { html = ''; $('#mc_embed_signup').html(html); }, error: function(data){ alert("error"); } }); } function mailChimpSubscribe(){ $.ajax({ url: 'index.php?route=common/footer/mailChimpSubscribe', type: 'POST', success: function(data) { html = ''; $('#mc_embed_signup').html(html); }, error: function(data){ alert("error"); } }); }