generate value after loading without clicking button