Modified HTML form and added some javascript