new index and javascript