mikehump
05-05-2003, 01:17 PM
Hi guys,
I would like to redo my web page using standard HTML Markup.
What I have now is a js file that is loaded at the top of the web page:
<script language="JavaScript" src="JS_Scripts/02_Baptism.js"></script>
<SCRIPT language=JavaScript1.2 type=text/javascript>
<!--
parseData_PrintHeader();
// -->
</SCRIPT>
and has the following:
start of function:
function parseData_PrintHeader() {
// grab search string
var rawData = unescape(location.search.substring(1))
if (rawData) {
// Divide long string into array of name/value pairs.
var srchArray = rawData.split("&")
var tempArray = new Array()
for (i = 0; i < srchArray.length; i++) {
// Divide each name/value pair temporarily into a two-entry array.
tempArray = srchArray[i].split("=")
// Use temp array values as index identifier and value.
//e.g. tempArray[0] = LevelOneScore, tempArray[1] = it's value
incomingData_Baptism[i] = tempArray[1]
// This has the score values in them: results[tempArray[0]]
//testscores[i] = results[tempArray[0]];
// alert("testscores[i] = " + testscores[i]);
}
Baptism_NoCorrect = incomingData_Baptism[0];
}
document.write("<table width='640' align='center' style='background-color: Black; color: White;'><tr><td><CENTER><H2><font face='Verdana, Arial, Helvetica, sans-serif'>Title Page</H2><BR><H3>Level 3 - Subtitle</H3></CENTER><p align='left'></p><ul><font size='-1'><b>CONGRATULATIONS!</b> You have made it past level 2, <b>Level 2</b> by geting <b>" + Baptism_NoCorrect + " out of 30</b> ....... "); etc.
end of function
After converting it to HTML Markup, I'm trying to figure out why this doesn't work:
<font size="-1"><b><font face="Verdana, Arial, Helvetica, sans-serif">CONGRATULATIONS!</font></b><font face="Verdana, Arial, Helvetica, sans-serif"> You
have made it past level 1, <b>The Sacraments in General</b> by geting --<b>
<script language="JavaScript1.2" src="JS_Scripts/02_Baptism.js">
<!--
InitialLevel_NoCorrect
// -->
</script>
out of 10</b> correct for a score of <b>
<script language="JavaScript1.2" src="JS_Scripts/02_Baptism.js">
<!--
FormatNumber(InitialLevel_Score.toString());
// -->
</script>
</b></font></font></p>
<p align="left"><font size="-1" face="Verdana, Arial, Helvetica, sans-serif">Game Summary:
You have reached level 2 and answered a total of <b>
<script language="JavaScript1.2" src="JS_Scripts/02_Baptism.js">
<!--
TotalCorrect;
// -->
</script>
</b> out of 10 possible questions.</font></p>
The text shows up OK, and I get no Javasript errors but the Javascript variables
don't show up at all.
Any help would be appreciated,
Mike
:(
I would like to redo my web page using standard HTML Markup.
What I have now is a js file that is loaded at the top of the web page:
<script language="JavaScript" src="JS_Scripts/02_Baptism.js"></script>
<SCRIPT language=JavaScript1.2 type=text/javascript>
<!--
parseData_PrintHeader();
// -->
</SCRIPT>
and has the following:
start of function:
function parseData_PrintHeader() {
// grab search string
var rawData = unescape(location.search.substring(1))
if (rawData) {
// Divide long string into array of name/value pairs.
var srchArray = rawData.split("&")
var tempArray = new Array()
for (i = 0; i < srchArray.length; i++) {
// Divide each name/value pair temporarily into a two-entry array.
tempArray = srchArray[i].split("=")
// Use temp array values as index identifier and value.
//e.g. tempArray[0] = LevelOneScore, tempArray[1] = it's value
incomingData_Baptism[i] = tempArray[1]
// This has the score values in them: results[tempArray[0]]
//testscores[i] = results[tempArray[0]];
// alert("testscores[i] = " + testscores[i]);
}
Baptism_NoCorrect = incomingData_Baptism[0];
}
document.write("<table width='640' align='center' style='background-color: Black; color: White;'><tr><td><CENTER><H2><font face='Verdana, Arial, Helvetica, sans-serif'>Title Page</H2><BR><H3>Level 3 - Subtitle</H3></CENTER><p align='left'></p><ul><font size='-1'><b>CONGRATULATIONS!</b> You have made it past level 2, <b>Level 2</b> by geting <b>" + Baptism_NoCorrect + " out of 30</b> ....... "); etc.
end of function
After converting it to HTML Markup, I'm trying to figure out why this doesn't work:
<font size="-1"><b><font face="Verdana, Arial, Helvetica, sans-serif">CONGRATULATIONS!</font></b><font face="Verdana, Arial, Helvetica, sans-serif"> You
have made it past level 1, <b>The Sacraments in General</b> by geting --<b>
<script language="JavaScript1.2" src="JS_Scripts/02_Baptism.js">
<!--
InitialLevel_NoCorrect
// -->
</script>
out of 10</b> correct for a score of <b>
<script language="JavaScript1.2" src="JS_Scripts/02_Baptism.js">
<!--
FormatNumber(InitialLevel_Score.toString());
// -->
</script>
</b></font></font></p>
<p align="left"><font size="-1" face="Verdana, Arial, Helvetica, sans-serif">Game Summary:
You have reached level 2 and answered a total of <b>
<script language="JavaScript1.2" src="JS_Scripts/02_Baptism.js">
<!--
TotalCorrect;
// -->
</script>
</b> out of 10 possible questions.</font></p>
The text shows up OK, and I get no Javasript errors but the Javascript variables
don't show up at all.
Any help would be appreciated,
Mike
:(