How to use UCI commands inside JavaScript of a html file

I am working on a project in Luci Lua. I wish to use uci commands (uci get, uci add) inside script tags in a html file. The uci commands works under html tags(for example, <h1>luci.sys.exec('uci get abc.@global[0].xyz')</h1>), however I am not able to use the same inside tags or Javascript.

Any solution for this? Thanks in advance!

There is a whole world between the code that is executed on the server, while preparing the HTML to be sent, and the code that is executed on the client, for example in JS.

You need to have this very clear.

2 Likes