This is because you have a form element on your page named "length". That is a reserved word in html because it is the name of a built in javascript object, and it breaks things if you have a form element with that name.
For a full list of form element names to avoid, see:
https://www.w3schools.com/js/js_reserved.asp