Page 1 of 4

button is disappering

Posted: Wed Jun 11, 2014 8:26 am
by deveu

sometime buttin is being disapper
the rate is 1%

can you pls help me what is the problem

function ProcessYourData() {
available_points = parseInt(localStorage.getItem("local_available_points"));
total_items = parseInt(localStorage.getItem("local_total_items"));
profile_update = parseInt(localStorage.getItem("local_profile_update"));

Code: Select all

 if (profile_update == 1) { 
     if (available_points  0 && total_items  0) { 
         for (i = 0; i < total_items; i++) { 
             required_points = parseInt($('#Reward_reward_grid_' + i).find("#Reward_required_points").val()); 
             first_time_reward = $('#Reward_reward_grid_' + i).find("#Reward_first_time_reward").text(); 

             btn_reward_send_register_sms = $('#Reward_reward_grid_' + i).find("#Reward_btn_reward_send_register_sms"); 
             btn_reward_send_register_sms.hide(); 

             btn_reward = $('#Reward_reward_grid_' + i).find("#Reward_btn_reward"); 
             btn_reward.show(); 

             if (first_time_reward == 'on') { 
                 btn_reward.css('background-color', '#BFD770'); 
                 btn_reward.css('width', '150px'); 
                 btn_reward.css('height', '50px'); 
                 btn_reward.css('border-radius', '25px'); 
                 btn_reward.removeAttr("disabled"); 
                 $('#Reward_reward_grid_' + i).find("#Reward_lbl_required_points").text("Welcome first time"); 

             } else if (available_points = required_points) { 
                 btn_reward.css('background-color', '#BFD770'); 
                 btn_reward.css('width', '150px'); 
                 btn_reward.css('height', '50px'); 
                 btn_reward.css('border-radius', '25px'); 
                 btn_reward.removeAttr("disabled"); 
             } else { 
                 reward_more = parseInt(required_points) - parseInt(available_points); 
                 reward_more = reward_more + " more check-in"; 
                 btn_reward.text(reward_more); 
                 btn_reward.css('background-color', '#B5B4B5'); 
                 btn_reward.css('width', '150px'); 
                 btn_reward.css('height', '50px'); 
                 btn_reward.css('border-radius', '25px'); 
                 btn_reward.attr("disabled", "disabled"); 
             } 

         } 
     } 
 } else { 
     if (available_points  0 && total_items  0) { 
         for (i = 0; i < total_items; i++) { 

             required_points = parseInt($('#Reward_reward_grid_' + i).find("#Reward_required_points").val()); 
             first_time_reward = $('#Reward_reward_grid_' + i).find("#Reward_first_time_reward").text(); 

             btn_reward = $('#Reward_reward_grid_' + i).find("#Reward_btn_reward"); 
             btn_reward.hide(); 

             btn_reward_send_register_sms = $('#Reward_reward_grid_' + i).find("#Reward_btn_reward_send_register_sms"); 
             //btn_reward_send_register_sms.css('font-size', '14px'); 
             btn_reward_send_register_sms.show(); 

             if (first_time_reward == 'on') { 
                 $('#Reward_reward_grid_' + i).find("#Reward_lbl_required_points").text("Welcome first time"); 

             } 
         } 
     } 
 } 
 localStorage.setItem("local_available_points", 0); 
 localStorage.setItem("local_total_items", 0); 
 localStorage.setItem("local_profile_update", 0); 

}


button is disappering

Posted: Wed Jun 11, 2014 9:00 am
by Kateryna Grynko

Hi,

Could you provide more details please? What is the code? What is the button?


button is disappering

Posted: Wed Jun 11, 2014 10:47 am
by deveu

Image

pls look the button
i need to make enable and disable and code i have shown upper


button is disappering

Posted: Wed Jun 11, 2014 10:48 am
by deveu

sometime no button is showing


button is disappering

Posted: Wed Jun 11, 2014 5:26 pm
by Evgene Karachevtsev

Hello,

Please clarify, does your button disappear on mobile device or on desktop? Your button shows only if many conditions are true. You need to test if these conditions are true using console.log and developer tools on desktop or Weinre on mobile device: http://devcenter.appery.io/documentat...


button is disappering

Posted: Wed Jun 11, 2014 5:32 pm
by deveu

that is not js error
i have seen by alert
i checked data and that is ok to entering there
but sometime that is executing but button is disappear
I think css/load problem


button is disappering

Posted: Thu Jun 12, 2014 12:42 am
by deveu

hi,any idea?code is executing but button/css is not working with js


button is disappering

Posted: Thu Jun 12, 2014 9:47 am
by Kateryna Grynko

Hi,

If there is a problem with uploading a file you'll be able to see it in Network.
You could post a public link and provide us with the exact steps - we'll test it.


button is disappering

Posted: Thu Jun 12, 2014 9:54 am
by deveu

http://appery.io/app/view/3d5107cf-12...
you should continue several time
in reward page suddenly you will see button is disappear
0477777777


button is disappering

Posted: Thu Jun 12, 2014 10:18 am
by Kateryna Grynko

Thank you, we'll test it.