You need to at least return the value you want in Javascript, and I don't thzink you need the function at all:
$js->eval_in_page(<<'JS'); return JSON.stringify(leg); JS
In reply to Re: Accessing javascript variable from perl
by Corion
in thread Accessing javascript variable from perl
by frazap
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |