'); } jQuery('#data_container_upload').html(''); jQuery('#email_one_err_msg').hide(); jQuery.ajax({ type: "POST", url: '/', data: { 'option':'com_aworewards','task':'invite_uploadone','tmpl':'component','no_html':1,'email': email }, success: function(data) { // now reload emails if(jQuery.trim(data.error)) { //jQuery('#email_one_err_msg').html(data.error).show().delay(5000).fadeOut(); jQuery('#email_one_err_msg').empty().html(''+data.error+'').show(); jQuery('#email_one_err_msg .upload_one_error').show().delay(5000).fadeOut(); // use this method since we cannot destroy the delay, so destroy the html that has a delay } if (data.contacts.length === 0) { jQuery('#email_container').html(''); return; } myhtml = '
\
'; jQuery('#data_container_upload').html(myhtml); }, dataType: 'json' }); //alert(email); jQuery('#email_one').focus(); } function switch_templates(type,id) { jQuery('.invitation_template_'+type).hide(); jQuery('#invitation_template_'+id).show(); if(type=='email') document.frmEmail.invitation_id.value = id; }