How to pass a list as parameter to js

Pvdn's icon

I'm trying to get a list into a javascript function, but i have no idea what to do. If i do...

function test(value)
{
    post(value)
}

... i only see the first item in the list.

It could be that i'm not preparing my message correctly. I used the prepend object to prepend the list with the js-functionname i want to call.

amounra's icon

Use the arrayfromargs() method:

function test()
{
    var args = arrayfromargs(arguments);
    post('args:', args, 'n');
}
Pvdn's icon

wow, thanks *a lot*!