Getting javascript variable in Scala -


i'm trying use varible javascript in scala array.
need objects list.
entrytype scala list.

var options = ""; (t = 0 ; t < @entrytypes.size(); t++) {    @defining('t') { =>     alert(@i)     options += "<option value='0'selected='selected'>@entrytypes(i).title</option>";   } }    

the thing can't access t, if try put @defining(t' { i=> not scala variable.
should do?

try this:

var options = ""; var entrytypes = @{html(json.stringify(json.tojson(entrytypes)))}; (t = 0 ; t < entrytypes.length; t++) {      alert(t);     options += "<option value='0'selected='selected'>" + entrytypes[t] + "</option>";   } }   

Comments

Popular posts from this blog

javascript - oscilloscope of speaker input stops rendering after a few seconds -

javascript - gulp-nodemon - nodejs restart after file change - Error: listen EADDRINUSE events.js:85 -

Fatal Python error: Py_Initialize: unable to load the file system codec. ImportError: No module named 'encodings' -