I'm using a custom HTML report with the showinfo() function imbedded into a script line that makes sure the hostname displays in upper case and changes the button colors if it has been up less than 99% of the last day.
Problem is, the buttons don't display anything when clicked on in "Good" or "Good99" status. "Bad" and "Acknowledged work properly. It must be a syntax problem with the way I'm using the escape character, but after an hour I still haven't got it to work.
Test Items (Good):
Code: Select all
<SCRIPT type="text/javascript">
var HN = "%CommentLine1%";
HN = HN.toUpperCase();
if (%PassedCnt%/%TotalTests%>0.99) document.write("<input type=button class=Good99 value= "+HN+" onclick=\"showinfo('Test name: \t%TestName% \nStatus: \t\t%Status% \nRecurrences: \t%Recurrences% \nReply: \t\t%Reply% \nUp Time: \t%AliveTime%')\">");
else document.write("<input type=button class=Good00 value= "+HN+" onclick=\"showinfo('Test name: \t%TestName% \nStatus: \t\t%Status% \nRecurrences: \t%Recurrences% \nReply: \t\t%Reply% \nUp Time: \t%AliveTime%')\">");
--></script>
Code: Select all
<SCRIPT type="text/javascript">
var HN = "LDAPC78";
HN = HN.toUpperCase();
if (132/132>0.99) document.write("<input type=button class=Good99 value= "+HN+" onclick=\"showinfo('Test name: \tLDAPC78
Image Workstation \nStatus: \t\tHost is alive \nRecurrences: \t2330 \nReply: \t\t31 ms \nUp Time: \t22:00:39')\">");
else document.write("<input type=button class=Good00 value= "+HN+" onclick=\"showinfo('Test name: \tLDAPC78 Image Workstation
\nStatus: \t\tHost is alive \nRecurrences: \t2330 \nReply: \t\t31 ms \nUp Time: \t22:00:39')\">");
--></script>
Thanks -