// JavaScript Document window.addEvent('domready', function() { $('phone_country').addEvent('click', function(){if(this.value=='Country Code'){ this.value = '';}}); $('phone_country').addEvent('blur', function(){if(this.value==''){ this.value = 'Country Code';}}); $('phone_area').addEvent('click', function(){if(this.value=='Area Code'){ this.value = '';}}); $('phone_area').addEvent('blur', function(){if(this.value==''){ this.value = 'Area Code';}}); $('phone_no').addEvent('click', function(){if(this.value=='Telephone'){ this.value = '';}}); $('phone_no').addEvent('blur', function(){if(this.value==''){ this.value = 'Telephone';}}); var registrationForm = new FormCheck('registration_form', { //makeTips:true, submitByAjax:true, ajaxEvalScripts : true, onAjaxRequest: function(jsonObj) { $('rego_preloader').setStyle('display','block'); $('regobtn').setStyle('display','none'); }, onAjaxSuccess: function(jsonObj) { //formloader.empty(); var decodeJSON = JSON.decode(jsonObj); var result = decodeJSON.result; $('rego_preloader').setStyle('display','none'); $('regobtn').setStyle('display','block'); if(result == 'success') { location.href = '/check+out/registration+confirmation'; } else { //alert('error'); //location.reload(true); $('regoerror').innerHTML = 'Error with registration. Please try again.'; //Recaptcha.reload (); //$('recaptcha_reload_btn').fireEvent('click'); } } });//onSubmit });