Add ajax function to result page