Calling  function from index.html file