Page 1 of 2

Button not visible

Posted: Wed Apr 16, 2014 1:10 pm
by deveu

before page show I want to keep button not visible.
I uncheck visible from properties.
after some process i want to make visible button with dynamic label
$("#buttion").show()

I use this but not working
may I know what is the way to make the button visible?

function ProcessYourData() {
available_points = parseInt(localStorage.getItem("local_available_points"));
total_items = parseInt(localStorage.getItem("local_total_items"));
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());
btn_reward = $('#Reward_reward_grid' + i).find("#Reward_btn_reward");
btn_reward.show();
if (available_points = required_points) {
btn_reward.css('background-color', '#BFD770');
btn_reward.attr("style", "width:150px;height:50px;background-color:#BFD770;border-radius:25px !important");
} 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.attr("style", "width:150px;height:50px;background-color:#B5B4B5;border-radius:25px !important");
btn_reward.attr("disabled", "disabled");
}
}
localStorage.setItem("local_available_points", 0);
localStorage.setItem("local_total_items", 0);

Code: Select all

 } 

}


Button not visible

Posted: Wed Apr 16, 2014 3:02 pm
by Maryna Brodina

Hello!

Use this codepreAppery("buttonName")&#46;show();/prewhere buttonName - button component name


Button not visible

Posted: Wed Apr 16, 2014 3:11 pm
by deveu

button is in a grid and bound with services
so name is same
that is doing on just first one
I need to apply on all cell

look at upper
btn_reward = $('#Reward_reward_grid_' + i).find("#Reward_btn_reward");
any way here


Button not visible

Posted: Wed Apr 16, 2014 4:43 pm
by Maryna Brodina

Are there any errors in console when you run this code?


Button not visible

Posted: Wed Apr 16, 2014 5:06 pm
by deveu

no


Button not visible

Posted: Wed Apr 16, 2014 8:21 pm
by Maryna Brodina

Please check if this is executed pre" for (i = 0; i < total_items; i++) {"/preby adding alert(i); inside.


Button not visible

Posted: Thu Apr 17, 2014 2:32 am
by deveu

yes executing properly
problem with button


Button not visible

Posted: Thu Apr 17, 2014 4:25 am
by Igor

Could you post app public link and steps how to reproduce this?


Button not visible

Posted: Thu Apr 17, 2014 6:29 am
by deveu

Button not visible

Posted: Thu Apr 17, 2014 7:37 am
by Kateryna Grynko

Deveu,

Is it the same application that you mention in another conversation?