field name

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

field name

Will
When I set a field in raw data, ideally I can pass the field name and value in URL, and then set the field in the server side.

For example, in ai.js.luan, I'm trying to do:

    local f = '"'..Http.request.parameters.f..'"'
    ...
    data.blocks[2].children[subIndex][f] = v

but this doesn't work.

I think I got the syntax wrong, but couldn't find examples in ed.html.luan
Reply | Threaded
Open this post in threaded view
|

Re: field name

fschmidt
Administrator
Did you try just:

    local f = Http.request.parameters.f
    ...
    data.blocks[2].children[subIndex][f] = v

?
Reply | Threaded
Open this post in threaded view
|

Re: field name

Will
I tried. It didn't work.

I also tried to json_string it. Also didn't work.
Reply | Threaded
Open this post in threaded view
|

Re: field name

fschmidt
Administrator
I will debug this now so please don't work on the code until I am done.
Reply | Threaded
Open this post in threaded view
|

Re: field name

fschmidt
Administrator
I made the change I suggested on line 207 and now it works fine.
Reply | Threaded
Open this post in threaded view
|

Re: field name

Will
works now.