I am in the process of developing an HTML file specifically designed for integration with the OpenWrt LuCI web interface. By referencing this helpful resource: , I have embarked on utilizing the Lua Markup language to execute a Lua function known as runDiag. The specific challenge I am facing involves passing the javascript variable, option, to the runDiag function. Despite my efforts to tweak the markup within the displayDiag function, I have encountered difficulties in achieving the desired outcome.
Is there anyone willing to provide assistance and guidance?
For illustration purposes, here is a sample snippet:
<%-
function runDiag(option)
return option
end
-%>
<script>
function displayDiag() {
var option = document.getElementById('iface').value;
document.getElementById('diag_text').innerHTML = '<%- write (runDiag(option)) -%>';
}
</script>