replace copytotextfield function to onchange using getelementbyid