I am working with data retrieved from a MySQL request. Each element has a unique id
, which is also passed as a parameter to the onclick function.
Every time an element is clicked, it triggers a search in the database for specific data. This process continues until the desired result is obtained. Once the expected answer is received, the function should stop.
My challenge is figuring out how to determine when the expected data has arrived so that I can halt the function. Changing the value of var x
leads to an "x is not defined" error.