Found the answer folks,
I need to include all of the function even the hidden modal on the landing page because once it was refreshed, what it was reading was not on the same page anymore instead, the data on the landing page..
Thanks anyway 🙂
solved Jquery doesn’t get the unique ID after an ajax post request