With a Perl CGI script, you generate an HTML page. This page, can of course contain some JavaScript function inside <SCRIPT> tags...
So... you can execute any JavaScript function from a CGI script if you use a JavaScript OnLoad() function in the <BODY> tag.
| [reply] [d/l] [select] |
I'm sorry. The page is corrupted because I forgot to place the "greater than" and "less than" character inside CODE tags. I can't update my comment anymore :-( | [reply] |
You would need to run a Java applet on the browser in order to be able to send commands to an HTML page without replacing it. Your perl program wouldn't be a CGI, but a standalone server interacting with the Java applet. For this you can use the NetServer::Generic module instead of dealing with sockets yourself.
On making the applet execute your javascript function you should check java.sun.com for documentation. I'm sure it's not hard to do what you want. | [reply] |