Lowest price ever! Learn Generative AI for 48% less!
Get my discount+ 2
The function declaration on line 143 lacks parentheses, that's all syntax-wise.
You might want to make sure that the window has finished loading before retrieving values from the document, otherwise you might end up with variables containing 'null' instead of a value, e.g. 'xxx' on line 2. That also goes for calls to functions which depend on document values.