Derma & HTML interactions?

Anyone give me an example of how to use the DHTML callbacks?

By which I mean executing a LUA function on callback, from inside the web page.

self:AddFunction( “console”, “log”, function( param ) self:ConsoleMessage( param ) end )

I have just been looking at this.

console.log(“say hey”)

outputs to console:

 say hey

console.log("RUNLUA: MyFunc()")


 RUNLUA: MyFunc()

It seems to be just printing the console.log into my console and not executing it.

js test


Try it

I tried including the lua.js file so I didn't have to build the strings etc. Both have same result lua.Run or console.log()

[editline]28th December 2013[/editline]

[editline]28th December 2013[/editline]

SetAllowLua( true );