updated javascript code.html