Updated error in code

added the write source for javascript on html index