Cannot get the results to returned back to my page code function from public .js file function.

Thank you for the assistance I left the onReady in by mistake when trying things. I have amended the code taking on board your advice ’ Screen elements cannot be accessed from Public files using the $w context selector’ However the problem of returning the results to the page code function still remains. I am probably doing something stupid again but still struggle resolve the issue. Thank you for your time and help I do appreciate it. Coz