Separate Javascript code from pure Perl code

Just save your JS code in separate .js files and load them as needed. Unless you specifically have to generate that code dynamically. I can hardly imagine such a situation.


In the past I've been the one "bashing" you for double posting here and in clpmisc with no mutual acknowledgement. (BTW: I won't have access to a proper news server and I find GG's UI to be too clunky for me.) Now I see you're including references when doing so: again, well done! Just bring the thingie one step further: when inserting a url like the above, it would be best not to put it in <code> tags, but to make it a proper link. There are many smart ways to do so in the Monastery. In this particular case I would have written something along the lines of

Please see this [http://groups.google.com/group/comp.lang.perl.misc/br +owse_thread/thread/4d2219139165592c/#|post] on clpmisc and suggest so +mething.

That renders as "Please see this post on clpmisc and suggest something."

I would also repeat the actual content of the linked to post, removing any reference to the original destination and adding PM-specific formatting to increase readability.


In reply to Re: Separate Javascript code from pure Perl code by blazar
in thread Separate Javascipt code from pure Perl code by Nik

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.