Added getData interval in javascript