Executing the callback code only if button vaue is 1.