i have this function that puts some data with ajax call in a php variable. When the data is put i show some message that the data is put and then i show a small part of that data.
the problem is that the javascript shows the message that it is put when the ajax call is still putting it, so the part of the data i want to show isn't there yet.
I have a work around whit a delay of some microseconds that pauses the rest of the javascript to be executed. But this doesn't work very well.
So i came across the ajaxComplete event but this executes every the time any ajax call is complete and i just want it to execute when that specific call (where i put the data) is complete. Is there a way to do this? Or is there an other way to execute the rest of the javascript only when the ajax call is complete?