I'm just now attempting to put javascript into my perl code using CGI.PM. I've got the appropriate code, so I won't put it here. In IE, it seems to be working fine, but in Mozilla, on the webpage displayed in Mozilla, the first line I see is:

//]]> End script hiding -->

Have I found some kind of browser difference that CGI.PM is sensitive to? I can put the code here if needed.

I think you probably will want to see the code. Also, when I say that in IE its fine, I meant that it doesn't display this anomaly. I do have some problems that I need to correct in my javascript, but that shouldn't affect this. Here is my code that puts the javascript in place.

$JSCRIPT=<<END; <script language="JavaScript"> input.value = max; textarea.focus(); function count(e, textarea, max, input) { if (!e.which) keyCode = event.keyCode; // ie5+ op5+ else keyCode = e.which; // nn6+ if (textarea.value.length<max+1) input.value = max - textarea.value.length; else { textarea.value = textarea.value.substring(0,max); input.value = 0; alert("Text size exceeded, results may be truncated"); return false; } } </script> END print $cgi->start_html( -style=>{'code'=>$STYLE}, -meta=>{ "Security" => "Confidential-Internal", "Description" => "IBM Record of Qwest Secalert", "Keywords" => "secalert,data_collect", "Content-Type" => "text/html; charset=iso-8859-1", "Pubisher" => "IBM Global Services at Qwest" }, -title=>"$title", -script=>$JSCRIPT );

In reply to Javascript difference in Mozilla by kmullin5016

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.