update ajax codes of perPage