what you are trying to do is custom coding. This is a support forum for how to use web assist software, not for custom coding.
If you need help with custom coding, we can offer that through a paid support ticket, that is the channel we offer for support on custom development.