Javascript not working on html tool