Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function sendAjax() {
- var xhr = new XMLHttpRequest()
- xhr.open('POST', siteUrl + 'ajax/ajax-mailchimp.html')
- xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded; charset=UTF-8')
- xhr.onload = function() {
- if(xhr.status === 200) {
- console.log(xhr.responseText)
- }
- }
- xhr.send(encodeURI('action=/craftMailchimped/submittal/receiveEmail&email=fakeemailaddress@yahoo.com'))
- }
- <?php
- namespace Craft;
- class CraftMailchimped_SubmittalController extends BaseController {
- public function actionReceiveEmail() {
- echo 'Wuzup?';
- }
- }
Add Comment
Please, Sign In to add comment