Let's give some explanations on the jQuery class.
It doesn't actually
do anything, it just passes commands with a string in jSon format to the script (ws.js) which interprets them. All the work is done by the script that already exists. So why did I mention complexity? Because understanding mechanics was not easy for me.
These parameters are specified in the Json string:
- Type (Create event, function, function with result, Method, Method with result)
- Method (html, val, css, property, text, select, dataTable, ecc...)
- Property (if method is property)
- Tag identifier
- Parameters (Array of simple or Json strings)
- Arguments (Array of simple or Json strings)
Not all parameters are used, but only those that are needed according to the command. So it is possible to read, set or populate a TAG (Text, Event, Value, etc.), create events (click, change, focus, mouse move-down-leave-enter, keyup, etc.) and receive notifications for each event.
Then the class will just do the work of creating the command following the syntax