Ajax working on 1 page
So the problem was that I have various pages in my module which are each separated in their respective files e.g. mymodule.module, mymodule.page2.inc, mymodule.page3.inc etc

The issue was that the form of the block was in mymodule.page2.inc so when the user navigated to page3 the methods of the form where not being loaded.

The solution was to copy all the form methods into mymodule.module since it is like the parent of all the pages, so then the methods were accessible from all the pages.