"Tom McKellips" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > When I run it on the command line I get no errors. But Still the Javascript > fails to execute in the browser if it is generated from PERL. If I put the > very same javascript in it's own html page and call it with a browser it > works perfect. > Do I have to escape javascript in perl some how?
To perl you are outputing a stream of bytes. I've done what you are proposing very often. I've even used scripting languges to output dynamic javascript code. but usually I like to use the: <script language="javascript" href="script.js" type="text/javascript></script> construct in my html <head> section, its easier on my xml parser.... As was suggested already, stick the output of the program in a file and open it in a browser. for instance, type: $ perl .\app.cgi > c:\stuff\app.html and then: $ iexplore c:\stuff\app.html and see if your javascript still works. I'm already about 98% sure it has nothing to do with perl, but if the code still breaks after the above, it proves your question belongs elsewhere. Todd W. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]