in reply to Re: call js function from CGI?
in thread call js function from CGI?

I tried this:
print '<script>reload_foobar function();</script>';
but no luck

Replies are listed 'Best First'.
Re^3: call js function from CGI?
by Corion (Patriarch) on Apr 08, 2008 at 14:48 UTC

    The code works for me in Perl:

    >perl -le "print '<script>reload_foobar function();</script>';" <script>reload_foobar function();</script>

    but this doesn't look very much like JavaScript to me:

    reload_foobar function();

    Maybe you can tell us what you want to do. Maybe you can also describe how Javascript::SpiderMonkey is overkill and how what you want can be done with less than pulling in a complete Javascript interpreter.

Re^3: call js function from CGI?
by ikegami (Patriarch) on Apr 08, 2008 at 17:07 UTC
    Check your browser's error console. I'm sure there's an error message waiting for you there, since what you posted isn't JavaScript.