generate random number and return it as json; receive json and render the value to page;