put refresh button in html and js and ajax code in js file. refresh button works