Script Error

J

JoeT

I have created a simple form and everytime I open it gives a script error.
But I just don't see the problem.
Line 18:
Char 14:
Error: expected ')'
Code: 0

!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!-- saved from url=(0044)http://www.mfwi.org/AmericanEval/Default.htm -->
<HTML><HEAD><TITLE>American Studies Evaluation</TITLE>
<META http-equiv=Content-Language content=en-us>
<META http-equiv=Content-Type content="text/html; charset=windows-1252">
<SCRIPT language=JavaScript>
<!--
javascript:window.history.forward(1);
//-->
</SCRIPT>

<META content="MSHTML 6.00.2900.2523" name=GENERATOR></HEAD>
<BODY bgColor=#ffffcc><!--webbot BOT="GeneratedScript" PREVIEW=" " startspan
-->
<SCRIPT language=JavaScript type=text/javascript><!--
function FrontPage_Form1_Validator(theForm)
{

if (theForm.1.Atmosphere.selectedIndex < 0)
{
alert("Please select one of the \"1.Atmosphere\" options.");
theForm.1.Atmosphere.focus();
return (false);
}

if (theForm.1.Atmosphere.selectedIndex == 0)
{
alert("The first \"1.Atmosphere\" option is not a valid selection.
Please choose one of the other options.");
theForm.1.Atmosphere.focus();
return (false);
}

if (theForm.2.Explanations.selectedIndex < 0)
{
alert("Please select one of the \"2.Explanations\" options.");
theForm.2.Explanations.focus();
return (false);
}

if (theForm.2.Explanations.selectedIndex == 0)
{
alert("The first \"2.Explanations\" option is not a valid selection.
Please choose one of the other options.");
theForm.2.Explanations.focus();
return (false);
}

if (theForm.3.Talk.selectedIndex < 0)
{
alert("Please select one of the \"3.Talk\" options.");
theForm.3.Talk.focus();
return (false);
}

if (theForm.3.Talk.selectedIndex == 0)
{
alert("The first \"3.Talk\" option is not a valid selection. Please
choose one of the other options.");
theForm.3.Talk.focus();
return (false);
}

if (theForm.4.Expected.selectedIndex < 0)
{
alert("Please select one of the \"4.Expected\" options.");
theForm.4.Expected.focus();
return (false);
}

if (theForm.4.Expected.selectedIndex == 0)
{
alert("The first \"4.Expected\" option is not a valid selection. Please
choose one of the other options.");
theForm.4.Expected.focus();
return (false);
}

if (theForm.5.Developing.selectedIndex < 0)
{
alert("Please select one of the \"5.Developing\" options.");
theForm.5.Developing.focus();
return (false);
}

if (theForm.5.Developing.selectedIndex == 0)
{
alert("The first \"5.Developing\" option is not a valid selection.
Please choose one of the other options.");
theForm.5.Developing.focus();
return (false);
}

if (theForm.6.Materials.selectedIndex < 0)
{
alert("Please select one of the \"6.Materials\" options.");
theForm.6.Materials.focus();
return (false);
}

if (theForm.6.Materials.selectedIndex == 0)
{
alert("The first \"6.Materials\" option is not a valid selection.
Please choose one of the other options.");
theForm.6.Materials.focus();
return (false);
}
return (true);
}
//--></SCRIPT>
 
F

FrontPageForms

Hi Joe,

If you are using results.csv then the file path would normally be
_private/results.csv You have the file destination set up like a folder
within the _private folder. Since you didn't say what the message was you are
getting, I won't swear this is the culprit. It could be if you didn's create
the folder in _private.

So is it a FrontPage error or a Javascript error?
 
R

Ronx

Your form fields have been given invalid names, which prevents the
JavaScript validation working properly.
Example:

name="1.Atmosphere"

The . is illegal in a Field name. Change it to name="1_Atmosphere"
and apply the same changes to the other fields.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top