HTML help for an edited report.html certificate

May 04, 2016

Good Morning! well i have for two days now been trying to edit a certificate i created by editing the report.html. I grabbed the code and edited it off of here to suite our needs. It seems to work great (see attached Picture) Now we would like to an e-mail hyperlink at the bottom below the print page button. Every time i try to add anything i lose all of the text on the certificate itself. I believe i am starting to go bonkers staring at HTML and seeing into the matrix (do i take the red or blue pill). Please help, all i want at the bottom is to add a hyper link email to: me@someemailaddress.com

6 Replies
David Hirsch

Thank you i uploaded a new version of it it needs to be open with notepad. But in case that doesn't work here is the html code:

<HTML>
<HEAD>
<!-- saved from url=(0014)about:internet -->
<TITLE>NetJets Maintenance Training Certificate of Completion</TITLE>

<SCRIPT>
var strTitle = "WiFi Training";

var g_arrMonths = new Array()

// Enter the month names below
try
{
g_arrMonths[0] = __MONTH_JAN__;
g_arrMonths[1] = __MONTH_FEB__;
g_arrMonths[2] = __MONTH_MAR__;
g_arrMonths[3] = __MONTH_APR__;
g_arrMonths[4] = __MONTH_MAY__;
g_arrMonths[5] = __MONTH_JUN__;
g_arrMonths[6] = __MONTH_JUL__;
g_arrMonths[7] = __MONTH_AUG__;
g_arrMonths[8] = __MONTH_SEP__;
g_arrMonths[9] = __MONTH_OCT__;
g_arrMonths[10] = __MONTH_NOV__;
g_arrMonths[11] = __MONTH_DEC__;

// Enter the column headers
var g_strDateTime = __DATE_TIME__;
var g_strStudentScore = __STUDENT_SCORE__;
var g_strPassingScore = __PASSING_SCORE__;
var g_strResult1 = __RESULT__;
var g_strQuestion = __QUESTION__;
var g_strCorrectAns = __CORRECT_ANS__;
var g_strResult2 = __RESULT__;
var g_strStudentAns = __STUDENT_ANS__;
var g_strPointsAwarded = __POINTS_AWARD__;
var g_strNeutral = __NEUTRAL__;
var g_strCorrect = __CORRECT__;
var g_strIncorrect = __INCORRECT__;
}
catch(e)
{
g_arrMonths[0] = "January";
g_arrMonths[1] = "February";
g_arrMonths[2] = "March";
g_arrMonths[3] = "April";
g_arrMonths[4] = "May";
g_arrMonths[5] = "June";
g_arrMonths[6] = "July";
g_arrMonths[7] = "August";
g_arrMonths[8] = "September";
g_arrMonths[9] = "October";
g_arrMonths[10] = "November";
g_arrMonths[11] = "December";

// Enter the column headers
var g_strDateTime = "Date / Time";
var g_strStudentScore = "Student Score";
var g_strPassingScore = "Passing Score";
var g_strResult1 = "Result";
var g_strQuestion = "Question";
var g_strCorrectAns = "Correct Answer";
var g_strResult2 = "Result";
var g_strStudentAns = "Student Answer";
var g_strPointsAwarded = "Points Awarded";
var g_strNeutral = "Neutral";
var g_strCorrect = "Correct";
var g_strIncorrect = "Incorrect";
}

</SCRIPT>

<STYLE>

TD {
font-size:10pt;
font-family:arial;
text-align: center;
width: 12.5%;
}

.CORRECT {
font-size:10pt;
font-family:arial;
color: #008800;
}

.INCORRECT {
font-size:10pt;
font-family:arial;
color: #880000;
}

.NEUTRAL {
font-size:10pt;
font-family:arial;
color: #000088;
}

.QUESTION {
font-size:10pt;
font-family:arial;
text-align: left;
width: 46.25%;
}

.NUMBER {
font-size:10pt;
font-family:arial;
text-align: center;
width: 3.75%;
}

.DATE {
font-size:10pt;
font-family:arial;
text-align: center;

}

.DATETIME {
font-size:10pt;
font-family:arial;
margin-top: 0;
margin-bottom: 0;
}

.SUMMARY {
font-size:10pt;
font-family:arial;
text-align: center;
}

H1 {
font-size:14pt;
font-family:newsgoth;
text-align: center;
}

TH {
font-size:12pt;
font-family:arial;
}

.image {
position: relative;
width: 100%; /* for IE 6 */
}

H2 {
font-size:42pt;
font-family:newsgoth;
text-align: center;
position: absolute;
top: 200px;
left: 0;
width: 100%;
}

</STYLE>

<SCRIPT>
var g_oContentResults = window.opener.g_oContentResults;
var g_listQuizzes = window.opener.g_listQuizzes;
var g_oPrintOptions = window.opener.g_oPrintOptions;


function FormatDate(dtmDate)
{
var strResult = "";
var nHours = dtmDate.getHours();
var strAM = "am";
var nMinutes = dtmDate.getMinutes();
var strMinutes = "" + nMinutes;

if (nMinutes < 10)
{
strMinutes = "0" + nMinutes;
}

if (nHours == 12)
{
strAM = "pm";
}

if (nHours > 12)
{
nHours -= 12;
strAM = "pm";
}

strResult += "<P>"
strResult += g_arrMonths[dtmDate.getMonth()] + " ";
strResult += dtmDate.getDate() + ", ";
strResult += dtmDate.getFullYear() + " ";
strResult += nHours + ":";
strResult += strMinutes + " ";
strResult += strAM;
strResult += "</P>"
return strResult;
}

</SCRIPT>

</HEAD>
<BODY>
<center>
<img src="quizimages/cert1.png">
</center>
<p>
<SCRIPT>

//document.write("<P><H1>" + strTitle + "</H1></P>");

if (g_oPrintOptions.strName)
{
if (g_oPrintOptions.strName.length > 0)
{
document.write("<H2><CENTER><I>Maintenance Training</I></br></br>");
document.write("<CENTER><I>Certifies That:</I></br></br>");
document.write("" + g_oPrintOptions.strName + "</br></br>");
document.write("<I>has completed:</I></br></br>");
document.write("" + strTitle + "</br></br>");
document.write("</br></br>");
document.write( FormatDate(g_oContentResults.dtmFinished));
document.write("Score: " + g_listQuizzes[g_oPrintOptions.strMainQuizId].nPtScore + "</br></br></H2>" );
document.write('<center> <input type=button onClick="window.print()" value="Print This Page"/> </center>');
document.write("<H1><CENTER><a href="mailto:mxtraining@yahoo.com">Mail To: MxTraining@yahoo.com</a></H1>");
}
}

</SCRIPT>
</BODY>
</HTML>

Ryan Lowry

Hi David,

The following line is probably causing your issues:

document.write("<H1><CENTER><a href="mailto:mxtraining@yahoo.com">Mail To: MxTraining@yahoo.com</a></H1>");

Change the double quotes surrounding mailto:mxtraining@yahoo.com to single quotes and this should work. e.g.

document.write("<H1><CENTER><a href='mailto:mxtraining@yahoo.com'>Mail To: MxTraining@yahoo.com</a></H1>");

Cheers,

Ryan

This discussion is closed. You can start a new discussion or contact Articulate Support.