index page for js returning values for function