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.

[lua]
self:AddFunction( “console”, “log”, function( param ) self:ConsoleMessage( param ) end )
[/lua]

I have just been looking at this.

console.log(“say hey”)

outputs to console:

 say hey

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

outputs:



```html
 RUNLUA: MyFunc()

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



js test

Clicky

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]

http://bit.ly/1ccsJY8

[editline]28th December 2013[/editline]

SetAllowLua( true );

:)

/close