add javascript for result pages.