I have some suggestions about your code
  1. If you are using "use CGI qw(:standard);", don't use this:
    print "Content-type: text/html\n\n";
    Use the CGI interfece:
    print header();
  2. Don't use multiple prints, if it is possible to use a single statement. Also if you can group strings, use qq//:
    #!/usr/bin/perl use warnings; use CGI qw(:standard); print header(); print qq~<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> <html> <head> <title>TPD-UTA TESTER</title> </head> <body> <script type="text/javascript" src="wz_jsgraphics.js"></script> <script type="text/javascript" src="line.js"></script> <div id="lineCanvas" style="overflow: auto;position:relative;height:30 +0px;width:400px;"> <script type="text/javascript"> var g = new line_graph(); g.add('1', 145); g.add('2', 0); g.add('3', 175); g.add('4', 130); g.add('5', 150); g.add('6', 175); g.add('7', 205); g.add('8', 125); g.add('9', 125); g.add('10', 135); g.add('11', 125); g.render("lineCanvas", "Line Graph"); </script> </body> </html> ~;
  3. Don't load a module if it is not used (HTML::Template)
  4. The language is "JavaScript" not "Java script"

In reply to Re: Help with Perl/Javascript by Burak
in thread Help with Perl/Javascript by Anonymous Monk

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.