JSON Parse problem

I am trying to use json parse thing, the one where i request a data from database and get the data and have the data shown in text.

so my mechanism is simple, i press the button, i get the response, and the response is shown as a text.

my problem is that, the button need to be clicked twice to get the data i want, not only that when i try to use 2 button, eventhoug each button have different request. but some how if i clicked the first button, nothing happen(usually “0” is shown), then if i clicked the other one, the response is from the first button.

anyway, this is me external link

what should i do to make it work, i mean like just one button clicked and i get the response?

p.s i use localhost API