i have a form like this :
if anyone have same problem , just remove form and use button
form
button
in this case your html and javascript should be something like this :
final