Event.observe(window, 'load', devloungePluginSeriesInit, false); function devloungePluginSeriesInit() { //new Validation('mailmanoptin_subscribeForm'); // OR new Validation(document.forms[0]); } function devloungePluginSeriesClick(evt) { var url = "https://www.davidreaston.com/wp_davidreaston/wp-content/plugins/devlounge-plugin-series/php/dl-plugin-ajax.php"; var success = function(t){devloungePluginSeriesClickComplete(t);} var myAjax = new Ajax.Request(url, {method:'post', onSuccess:success}); return false; } function devloungePluginSeriesClickComplete(t) { alert(t.responseText); } function mailmanoptin_submitForm() { var valid = new Validation('mailmanoptin_subscribeForm', {onSubmit:false}); var result = valid.validate(); if (result) { var url = "https://www.davidreaston.com/wp_davidreaston/wp-content/plugins/mailman-optin/php/mailman-optin-ajax.php"; //generate the query string that passes on the required parameters //there is a longer method but we’ll stick to this one var pars=$('mailmanoptin_subscribeForm').serialize(); //this variables holds the ID of the DIV that will be updated var thatplace='mailmanoptin_content'; //the actual action takes place here var AjaxAction=new Ajax.Updater(thatplace, url, {method: 'post', postBody: pars}); } return false; } function mailmanoptin_unsubscribe() { var valid = new Validation('mailmanoptin_unsubscribeForm', {onSubmit:false}); var result = valid.validate(); if (result) { var url = "https://www.davidreaston.com/wp_davidreaston/wp-content/plugins/mailman-optin/php/mailman-optin-ajax.php"; //generate the query string that passes on the required parameters //there is a longer method but we’ll stick to this one var pars=$('mailmanoptin_unsubscribeForm').serialize(); //this variables holds the ID of the DIV that will be updated var thatplace='mailmanoptin_unsubscribe_content'; //the actual action takes place here var AjaxAction=new Ajax.Updater(thatplace, url, {method: 'post', postBody: pars}); } return false; }