Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

script error, test taker undefined

Status
Not open for further replies.

DrAsh

Technical User
May 3, 2001
46
US
Okay, I am getting an error when I preview my script in Frontpage. It says:

test_taker is undefined.

here's the script. I can't tell what I'm doing wrong. It should be defined as the text form named test_taker

<script language=&quot;JAVASCRIPT&quot;>
function grading(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10){
var right = 0;
var passed = 0;

if (a1 == &quot;T&quot;) or (a1 == &quot;t&quot;);{
right = (right + 1);
}
if (a2 == &quot;T&quot;) or (a2 == &quot;t&quot;);{
right = (right + 1);
}
if (a3 == &quot;F&quot;) or (a3 == &quot;f&quot;);{
right = (right + 1);
}
if (a4 == &quot;T&quot;) or (a4 == &quot;t&quot;);{
right = (right + 1);
}
if (a5 == &quot;F&quot;) or (a5 == &quot;f&quot;);{
right = (right + 1);
}
if (a6 == &quot;T&quot;) or (a6 == &quot;t&quot;);{
right = (right + 1);
}
if (a7 == &quot;T&quot;) or (a7 == &quot;t&quot;);{
right = (right + 1);
}
if (a8 == &quot;F&quot;) or (a8 == &quot;f&quot;);{
right = (right + 1);
}
if (a9 == &quot;T&quot;) or (a9 == &quot;t&quot;);{
right = (right + 1);
}
if (a10 == &quot;T&quot;) or (a10 == &quot;t&quot;);{
right = (right + 1);
}

if (right == 9){
passed = 1;
}
if (right == 10){
passed = 1;
}
if (passed == 1){
name_on_certificate.value == test_taker.value;
}
if (passed == 0){
prompt(&quot;You Failed and You must retake test. Hit cancel and refresh&quot;);
}
}
</script>
<tr>
<td width=&quot;618&quot; height=&quot;32&quot; colspan=&quot;3&quot;><font face=&quot;Arial&quot;><em><strong>ENTER YOUR NAME
HERE:</strong>&nbsp; </em><input type=&quot;text&quot; name=&quot;test_taker&quot; size=&quot;36&quot;></font></td>
</tr>


 
Any chance for the full coding? I noticed that apr 90% of the table is missing. A working(almost) version of the page would be appreciated. DeltaFlyer ;-)

DeltaFlyer - The Only Programmer To Crash With [colo
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top