When Creating Dynamic Content With AJAX Don't Forget To...
Join the DZone community and get the full member experience.Join For Free
When using AJAX to get data from the server to fill an HTML element, some peolpe find that the AJAX call only works the first time it is executed. If your request returns different data each time there is nothing to worry about but if the server returns the same data twice, nothing will happen on the page the second time. To prevent a null AJAX call you need to clear the HTML element (e.g.) that is displaying the data before executing the request.
Data returned from the server
Opinions expressed by DZone contributors are their own.