Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Javascript and Perl 4

Status
Not open for further replies.

CWebster

Programmer
Jun 12, 2002
38
GB
Hi

Using Perl for the first ever time and I've a couple of quick questions:

1. Can I use JavaScript within Perl? If so, do I use the <script> tags like I would within HTML or is there another way that I should be using?

2. When a line is proceeded by the # character, does this make the line a comment that the browser doesn't read?

Thanks for your time!
 

1. What you are having perl do is use html in the browser, and you can use javascript in html.

2. # is usually a comment, execept in the case of #!/usr/bin/perl
 
Sorry, CherylD, I don't quite understand point no.1

What I need to do is dynamically create a frameset within Perl and the only way I know how to do this is with JavaScript. Would I be ok to go ahead and use JavaScript here?
 
Normally you have a perl script generating html for a client, this html can contain javascript.

The perl scripts are executed on the server, the result (what is printed to stdout) is then sent to the browser which requested to have the script run. It is _not_ run in the browser, hence javascript can not be executed inside perl. It can only be executed in the html-page that is output by the perl-script.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top