i used a html macro to display a static table. A small piece of javascript is used to highlight the rows depending on table values. this works well on the preview screen. however, in the actual view, color highlight is no where to be found. below is my code in html macro:

      <html>
      <head>
      <script type="text/javascript">

      $(document).ready(function(){
      $('#report td.status').each(function(){
      if ($(this).text() == 'failed')

      { $(this).css('background-color','red'); }

      if ($(this).text() == 'passed')

      { $(this).css('background-color','green'); }

      });
      });

      </script>

      </head>
      <body>

      <table id="report">
      <tr><th>Builds</th><th>Status</th></tr>
      <tr><td>1</td><td class="status">failed</td></tr>
      <tr><td>2</td><td class="status">passed</td></tr>
      <tr><td>3</td><td class="status">passed</td></tr>
      <tr><td>4</td><td class="status">failed</td></tr>
      </table>

      </body>
      </html>

            [CONFSERVER-41254] html macro javascript issue

            Hello azwandi.mohdaris,

            You have your JavsScript inside a <head></head> tag. The HTML macro takes snippets of HTML and JavaScript, not whole pages. You need to re-write it so it's just HTML followed by the <script type="text/javascript"></script> tag.

            I'm closing this bug as Invalid. If you have questions about specific JavaScript issues, please ask them in https://answers.atlassian.com/.

            Regards,
            James Richards
            Senior Support Engineer

            James Richards added a comment - Hello azwandi.mohdaris , You have your JavsScript inside a <head></head> tag. The HTML macro takes snippets of HTML and JavaScript, not whole pages. You need to re-write it so it's just HTML followed by the <script type="text/javascript"></script> tag. I'm closing this bug as Invalid. If you have questions about specific JavaScript issues, please ask them in https://answers.atlassian.com/ . Regards, James Richards Senior Support Engineer

            I've also seen inconsistencies when using the HTML macro - previewing (works ok) and actual viewing (not ok).

            Azwandi [ServiceRocket] added a comment - I've also seen inconsistencies when using the HTML macro - previewing (works ok) and actual viewing (not ok).

              Unassigned Unassigned
              fe493c9a2686 Ming Ho
              Affected customers:
              1 This affects my team
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: