view and js for pulling data periodically