adds ajax each loop to display primes in index and post request vars as parameters to primes controller method call