Update the query without refreshing the page

Is this a good approach?? @Teodor