Example 8.3 of XSLT Report Tool Uses Guide not working

I am developing a detailed BOM report using XSLT and a Method in 12sp18
Typically, the Method must accept item_number as a parameter. 

So I looked at the XSLT Report Tool User Guide, and Section 8.3 describes User Input for XSLT based Report - easy...


The sample given has errors in the JavaScript,
for example

var params = ...
should be var param =...

The current situation is

1. Defined Action, and are able to call the action
2. The HTML page was modified to just have item_number as an input field. The HTML is presented, as per the 8.3 example
3. After entering the item_number or , nothing else happens.
4. Using F12 in Chrome, shows that the line function callback(dialogWrapper), dialogWrapper is not defined, hence the next line of var result=dialogWrapper.result produces an error.

I don't know how to get the item_number from the HTML page, to the client method for subsequent processing and report generation

has anyone used this example from the documentation?