| Server IP : 192.169.170.185 / Your IP : 216.73.216.97 Web Server : Apache System : Linux p3plmcpnl495852.prod.phx3.secureserver.net 4.18.0-553.52.1.lve.el8.x86_64 #1 SMP Wed May 21 15:31:29 UTC 2025 x86_64 User : akhilnew ( 1712764) PHP Version : 5.6.40 Disable Function : NONE MySQL : ON | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/akhilnew/public_html/florajournal/js/ |
Upload File : |
$(document).ready(function(){
$('form').attr('autocomplete', 'off');$('input:submit,button').prop('disabled', false);
$('.addfield').live('click',function(){
$('.morefield').append('<div class="fluid flex" style="margin-top:10px"><input type="file" name="file[]" multiple="multiple" autocomplete="off" class="field field-file" /><input type="button" value="Remove Files" class="default" onclick="$(this).parents(\'.flex\').remove();" /></div>');
});
$('.ajax-form').submit(function(e){
var input=$(this).find(':input'),button=$(this).find('[type=submit]'),loader=$(this).find('.loader'),output=$('.output');
$.ajax({
type:this.method,
url:this.action,
data:new FormData(this),
cache:false,
dataType:'json',
contentType:false,
processData:false,
beforeSend:function(){
loader.show(0),output.hide(0),input.prop('disabled', true),button.hide(0);
$('.morefield .field-file').each(function(index, element){
if($(this).val() == ''){
$(this).parents('.flex').remove();
}
});
},
success:function(json){
if(json.stat == true){
if(typeof(json.surl) !== 'undefined'){
window.self.location = json.surl;
}else{
$('.ajax-form').trigger('reset').hide(0);
output.addClass('s').html(json.text).show(0);
}
}else{
loader.hide(0),input.prop('disabled', false),button.show(0);
output.addClass('e').html(json.text).show(0);
}
if($('.g-recaptcha').is(':visible')){
if(typeof(grecaptcha) !== 'undefined'){ grecaptcha.reset(); }
}
$('html, body').animate({scrollTop:output.offset().top-300},300);
},
error:function(){
loader.hide(0),input.prop('disabled', false),button.show(0);
output.addClass('e').html('An error occurred. Please try again later.').show(0);
$('html, body').animate({scrollTop:output.offset().top-300},300);
}
});
return false;
});
});
$('.phone').bind('paste input', function (e){
var initVal = $(this).val();
outputVal = initVal.replace(/[^0-9+\-,]/g, '');
if(initVal != outputVal)
$(this).val(outputVal);
});
$('.digit').bind('paste input', function (e){
var initVal = $(this).val();
outputVal = initVal.replace(/[^0-9]/g, '');
if(initVal != outputVal)
$(this).val(outputVal);
});
$('.amount').bind('paste input', function (e){
var initVal = $(this).val();
outputVal = initVal.replace(/[^0-9.]/g, '');
if(initVal != outputVal)
$(this).val(outputVal);
});
$('.output').click(function(e){
$(this).hide(0);
});
function reCAPTCHA(){
$('.img-captcha').attr('src', $('#BASEURL').val() + 'captcha?' + Math.random());
$('.field-captcha').val('');
}
function CTRLF(value){
if(value == 'Other'){
$('.other').val('').show(0);
}else{
$('.other').val(value).hide(0);
}
}
function p(f) {
$.ajax({
type: $(f).attr('method'),
url: $(f).attr('action'),
data: $(f).serialize(),
cache: false,
dataType: 'json',
beforeSend: function () {
$('.enquirybutton').hide(0); $('.sloader').show(0); $('.customtoast').hide(0).html('');
},
success: function (r) {
if (r.s == true) {
$('.subenqform').hide(0).find('form')[0].reset(); $('.customtoast').css('background', 'green');
} else {
$('.customtoast').css('background', 'red');
}
$('.enquirybutton').show(0); $('.sloader').hide(0); $('.customtoast').show(0).html(`<div style="display:flex;align-items:center;justify-content:space-between;"><span>${r.t}</span><button type="button" onclick="$('.customtoast').hide(0).html('');"><span class="material-icons" style="color:#fff;">close</span></button></div>`);
},
error: function () {
$('.enquirybutton').show(0); $('.sloader').hide(0); $('.customtoast').show(0).html(`<div style="display:flex;align-items:center;justify-content:space-between;"><span>An error occurred. Please try after some time.</span><button type="button" onclick="$('.customtoast').hide(0).html('');"><span class="material-icons" style="color:#fff;">close</span></button></div>`).css('background', '#f00');
}
});
grecaptcha.execute(Object.fromEntries(new URL(googlerecaptcha.src).searchParams).render, { action: 'contact' }).then(function (token) {
document.getElementById('recaptchaResponse').value = token;
});
return false;
}
function showEnquiryForm() {
$('.subenqform').show(0); $('.customtoast').hide(0).html('');
}
$(window).on('scroll', function () {
if ($(this).scrollTop() > 100) {
$('.subscriptionenquirycanvas').css('bottom', 0);
} else {
$('.subscriptionenquirycanvas').css('bottom', -84);
}
});