Pilot script and javascript

Hello,

I'd like to know if there is a way in pilot script to write Javascript.

What I want to do is writing a javascript array into my web page. The array's data are from a SQL query, so I planed to do the query -> get the result in a pilot script and then build my javascript table form this script.

Let me know what you think about that.

Thnak you

florent