I want to pass some arg from a htm file to a function which locates in */controller/ like:
entry({"admin", "network", "mine"}, call("my_function"), nil).leaf = true
my_function(arg)
--[[
*****
]]--
end
The code in htm file is like:
arg = prompt("Input you number: ")
XHR.poll('<% luci.dispather.build_url("admin", "network", "mine") %>', arg, callback);
but the arg is never passed to the function. I saw a similar example in wifi_status.htm. But the arg is a lua data. Like:
XHR.poll('<% luci.dispather.build_url("admin", "network", "wireless_status", self.ifname) %>' ,null, callback);
So here is the problem: my arg is input from the web, sort of js data. But I need pass it to the function in lua. How could I
achieve that.? Or can you offer some advice to help, please?
Thank you in advance.
(Last edited by Wandy on 18 Jun 2014, 02:34)