Hi Monk,
I have a cgi script. Where I have some code like below :

my $q = new CGI ; #a cgi object print $q->h3("Process"); print $q->html("Steps"); print qq{<FONT SIZE=-1><I>(Click on the hyperlinks in the 'task' colum +n to see further information on methods [if available])</I></FONT><BR +>\n}; print qq{<FONT SIZE=-1><I>(Note: Hyperlinks to the <B>Command/Method +</B> log files will not work on windows)</I></FONT><BR>\n}; print qq{<TABLE BORDER=1 ><TR BGCOLOR="#D0D0D0"> <TH ALIGN=LEFT>Task</TH><TH ALIGN=LEFT>Command</TH><TH ALIGN=LEFT> +Method</TH><TH ALIGN=LEFT>Status</TH><TH ALIGN=LEFT>Task version</TH><TH ALIGN=LE +FT>Tool version</TH><TH ALIGN=LEFT>Last changed</TH><TH ALIGN=LEFT>Comments</TH></TR> \n } +;


Now how can I include this following javascript code in that script. I need to know the syntax Thanks in advance.

<script type="text/javascript" src="http://code.jquery.com/jquery-1.7. +2.min.js"></script> <script type="text/javascript"> $(document).ready(function(){ $('TABLE:has(th:contains("Status"))').attr('id','maintab'); $('th:contains("Status")').html('<select id="your_answer" name="your_a +nswer" style="margin-bottom:5px"><option value="showAll">showAll</opt +ion><option value="onlyValidStatus">onlyValidStatus</option></select> +<br />Status'); $('#maintab td').each(function(){ if($(this).is(':first-child') && $(this).attr('rowspan')=='undefined') +{ $(this).css('background-color','Red'); $(this).parent().addClass('hid'); } if($(this).is(':nth-child(2)') && $(this).find('a').length==0){ $(this).parent().addClass('hid'); /* if you don't want not valid rows to be colorized remove the two lines below or just comment these lines */ $(this).css('background-color','#f5f5f5'); $(this).siblings().css('background-color','#f5f5f5'); } }); $('#your_answer').change(function(){ if($(this).val()=='onlyValidStatus'){$('.hid').css('display','none');} if($(this).val()=='showAll'){$('.hid').css('display','TABLE-row');} $(this).blur(); }); }); </script>

In reply to CGI PERL Help required by ghosh123

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.