How to incorporate Javascript into method or custom keyword

Hi,
I am not having any luck getting "WebUI.executeJavaScript() to work with my attached Javascript.
I am not sure of the syntax to use… The script works fine in Chrome when loaded. Just not sure how to encapsulate it in "WebUI.executeJavaScript(). Can anyone give me an example?

WorksSIN.html (733 Bytes)