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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

onclick Form event

Status
Not open for further replies.

leahyj

MIS
May 5, 2004
107
US
Hi,

I have a form in a page that has quite a few checkboxes, and when a user clicks on a checkbox the Forms onclick envent is triggered. In IE it works, but in Firefox it doesn't work.

The event does finally get triggered if the user clicks in an input element, but I want it to trigger when anything is clicked on the form.

Code:
<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>TITLE</title>

<style type="text/css">
body 
{
background-image:
url('b10005.gif')
}
.style1 {
	text-align: left;
}
.style2 {
	margin-left: 0px;
	margin-top: 0px;
}
.style3 {
	border-width: 1px;
}
.style4 {
	color: #000080;
}
</style>

<script Language="JavaScript" type="text/javascript">

var chkArray2 = new Array;
var datealert = 0;
var emailalert = 0;

function regform_Validator(theForm)
{
  var tableexists = document.getElementById("regresults_table");

  if (tableexists != null)
  {
     alert("Please answer the question in the" + "\n" + "Registration Results section.");
     return (false);
  }
  
  if (theForm.FirstName.value == "")
  {
    alert("Please enter a value for the \"First Name\" field.");
    theForm.FirstName.focus();
    return (false);
  }

  if (theForm.LastName.value == "")
  {
    alert("Please enter a value for the \"Last Name\" field.");
    theForm.LastName.focus();
    return (false);
  }

  if (theForm.HomePhone.value == "" && theForm.AlternatePhone.value == "")
  {
    alert("Please enter a value for the \"Home Phone\" field."+ "\n" + "If you phone format doesn't fit \"###-###-####\", use the \"Alternate Phone\" field.");
    theForm.HomePhone.focus();
    return (false);
  }

  if (theForm.HomePhone.value.length < 12 && theForm.AlternatePhone.value == "")
  {
    alert("Please enter at least 12 characters in the \"Home Phone\" field." + "\n" + "If you phone format doesn't fit \"###-###-####\", use the \"Alternate Phone\" field.");
    theForm.HomePhone.focus();
    return (false);
  }

  if (theForm.HomePhone.value.length > 12 && theForm.AlternatPhone.value == "")
  {
    alert("Please enter at most 12 characters in the \"Home Phone\" field." + "\n" + "If you phone format doesn't fit \"###-###-####\", use the \"Alternate Phone\" field.");
    theForm.HomePhone.focus();
    return (false);
  }

  var checkOK = "0123456789";
  var dashOK = "-"
  var checkStr = theForm.HomePhone.value;
  var allValid = true;
  for (i = 0;  i < checkStr.length;  i++)
  {"\n"
    if(i==3 || i==7){
    ch = checkStr.charAt(i);
    for (j = 0;  j < dashOK.length;  j++)
      if (ch == dashOK.charAt(j))
        break;
    if (j == dashOK.length)
    {
      allValid = false;
      break;
    }}
    else {
    ch = checkStr.charAt(i);
    for (j = 0;  j < checkOK.length;  j++)
      if (ch == checkOK.charAt(j))
        break;
    if (j == checkOK.length)
    {
      allValid = false;
      break;
    }}

  }
  if (!allValid)
  {
    alert("Please enter only numbers and dashes in the \"Home Phone\" field." + "\n" + "If you phone format doesn't fit \"###-###-####\", use the \"Alternate Phone\" field.");
    theForm.HomePhone.focus();
    return (false);
  }


  if (theForm.Zip.value == "")
  {
    alert("Please enter a value for the \"Zip Code\" field.");
    theForm.Zip.focus();
    return (false);
  }

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

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

  var bahaiSelected = false;
  for (i = 0;  i < theForm.optBahai.length;  i++)
  {
    if (theForm.optBahai[0].checked)
        bahaiSelected = true;
  }
  if (bahaiSelected)
  {
	if (theForm.BahaiID.value == "")
  		{
    			alert("Please enter a value for the \"Bahai ID\" field.");
   			theForm.BahaiID.focus();
    			return (false);
  		}	
  }


  var checkOK = "0123456789- ()";
  var checkStr = theForm.AlternatePhone.value;
  var allValid = true;
  for (i = 0;  i < checkStr.length;  i++)
  {
    ch = checkStr.charAt(i);
    for (j = 0;  j < checkOK.length;  j++)
      if (ch == checkOK.charAt(j))
        break;
    if (j == checkOK.length)
    {
      allValid = false;
      break;
    }
  }
  if (!allValid)
  {
    alert("Please enter only numbers or dashes in the \"Alternate Phone\" field.");
    theForm.AlternatePhone.focus();
    return (false);
  }

 if (theForm.BirthDate.value != "")

 {

 var strinvalid = "Invalid Date!";
 var newdate = theForm.BirthDate.value


 newdate = newdate.replace(/-/,"/");
 newdate = newdate.replace(/-/,"/");

  var checkOK = "/";
  var checkStr = newdate;
  var allValid = false;
  for (i = 0;  i < checkStr.length;  i++)
  {
    ch = checkStr.charAt(i);
    if (ch == "/") {
	allValid = true; break;
	}
  }

  if (!allValid)
  {
    alert(strinvalid +  "\n" + " Date must be in 'mm/dd/yyyy' or 'mm-dd-yyyy' or similar format.");
    theForm.BirthDate.focus();
    return (false);
  }


 if(newdate.length < 8){
 alert(strinvalid +  "\n" + " Date must be in 'mm/dd/yyyy' or 'mm-dd-yyyy' or similar format.");
 theForm.BirthDate.focus();
 return (false);
 }


 var cnvnewdate = new Date(newdate);

 if(cnvnewdate == "NAN"){
 alert(strinvalid +  "\n" + " Date must be in 'mm/dd/yyyy' or 'mm-dd-yyyy' or similar format.");
 theForm.BirthDate.focus();
 return (false);
 }

 var thenewyear=cnvnewdate.getFullYear();

 if(thenewyear < 1901){
 alert(strinvalid +  "\n" + "Year cannot be less than 1901."  +  "\n" + "Date must be in 'mm/dd/yyyy' or 'mm-dd-yyyy' or similar format.");
 theForm.BirthDate.focus();
 return (false);
 }


 }

  if (theForm.BirthDate.value == "")
  {
	if(datealert == 0) {
	var r = confirm("You have chosen not to enter your birthdate." + "\n" + "Are you over 25 years of age?");
	if(!r){
		theForm.BirthDate.focus();
		return (false);
	      }
	else
		{
			datealert = 1;
		}
	}
  }



  if(theForm.Email.value.length > 0 && emailalert == 0) 
			{
			  var email=prompt("Please re-enter your email address.", "")
  				if ((email!=theForm.Email.value) && (email!=null && email!=""))
    					{
    					alert("Email addresses do not match.");
					regform_Validator(theForm);}
				else if(email!=null && email!=""){
					emailalert = 1;
					return regform_Validator2(theForm);}
				else {
					return (false);}
  			}
			


  return regform_Validator2(theForm);
}

function regform_Validator2(theForm)
{

var chkArray = new Array();

for(k=0; k < theForm.elements.length; k++)
{
	if(theForm.elements[k].checked && theForm.elements[k].type=="checkbox")
	{
		chkArray[k] = theForm.elements[k].name;
	}
}


if(chkArray.length==0)
{
alert("Please choose from a \"Full Session Package\"," + "\n" + "or a \"Day Package\".");
theForm.FSsubtotal.focus();
return (false);
}

var l
var arBool = false;

for(l in chkArray)
{

if(chkArray[l].substr(0,5)=="chkFS" || chkArray[l].substr(0,5)=="chkRM" || chkArray[l].substr(0,6)=="chkDAY")
	{	
		arBool = true;
		break;
	}
}


if(!arBool)
{
alert("Please choose from a \"Full Session Package\"," + "\n" + "or a \"Day Package\".");
theForm.FSsubtotal.focus();
}


return (arBool);

}



function regform_Total(theForm)
{

var fstotal = 0;
var fstotal2 = 0;
var fstotal3 = 0;
var rmtotal = 0;
var rmtotal2 = 0;
var rmtotal3 = 0;
var daytotal = 0;
var daytotal2 = 0;
var daytotal3 = 0;
var mealtotal = 0;
var mealtotal2 = 0;
var mealtotal3 = 0;
var alltotal = 0;
var alltotal2 = 0;
var alltotal3 = 0;

for(b=0; b < theForm.elements.length; b++)
{
	if(theForm.elements[b].checked && theForm.elements[b].type=="checkbox")
	{	var chked = theForm.elements[b].name;

		if(chked.substr(0,5)=="chkFS")
		{
			if(fstotal==0)
			{
			fstotal += eval(theForm.elements[b].value);
			}
		}

		if(chked.substr(0,5)=="chkRM")
		{
			if(rmtotal==0)
			{
			rmtotal += eval(theForm.elements[b].value);
			}
		}

		if(chked.substr(0,6)=="chkDAY")
		{
			daytotal += eval(theForm.elements[b].value);
		}

		if(chked.substr(0,7)=="chkMEAL")
		{
			mealtotal += eval(theForm.elements[b].value);
		}
	}
}

fstotal2 = fstotal - (fstotal * .15)
fstotal3 = fstotal - (fstotal * .10)
rmtotal2 = rmtotal - (rmtotal * .15)
rmtotal3 = rmtotal - (rmtotal * .10)
daytotal2 = daytotal - (daytotal * .15)
daytotal3 = daytotal - (daytotal * .10)



document.forms['regform_frm'].elements['FSsubtotal'].value = formattocurrency(fstotal.toFixed(2));
document.forms['regform_frm'].elements['FSsubtotal2'].value = formattocurrency(fstotal2.toFixed(2));
document.forms['regform_frm'].elements['FSsubtotal3'].value = formattocurrency(fstotal3.toFixed(2));
document.forms['regform_frm'].elements['RMsubtotal'].value = formattocurrency(rmtotal.toFixed(2));
document.forms['regform_frm'].elements['RMsubtotal2'].value = formattocurrency(rmtotal2.toFixed(2));
document.forms['regform_frm'].elements['RMsubtotal3'].value = formattocurrency(rmtotal3.toFixed(2));
document.forms['regform_frm'].elements['DAYsubtotal'].value = formattocurrency(daytotal.toFixed(2));
document.forms['regform_frm'].elements['DAYsubtotal2'].value = formattocurrency(daytotal2.toFixed(2));
document.forms['regform_frm'].elements['DAYsubtotal3'].value = formattocurrency(daytotal3.toFixed(2));
document.forms['regform_frm'].elements['Mealsubtotal'].value = formattocurrency(mealtotal.toFixed(2));
document.forms['regform_frm'].elements['Mealsubtotal2'].value = formattocurrency(mealtotal2.toFixed(2));
document.forms['regform_frm'].elements['Mealsubtotal3'].value = formattocurrency(mealtotal3.toFixed(2));
alltotal = fstotal + rmtotal + daytotal + mealtotal;
alltotal2 = alltotal - (alltotal * .15)
alltotal3 = alltotal - (alltotal * .10)
document.forms['regform_frm'].elements['Total'].value = formattocurrency(alltotal.toFixed(2));
document.forms['regform_frm'].elements['Total2'].value = formattocurrency(alltotal2.toFixed(2));
document.forms['regform_frm'].elements['Total3'].value = formattocurrency(alltotal3.toFixed(2));

return true;

}


function formattocurrency(number)
{
var pos = 0;
var comma = ",";
var dollar = "$";
var newnumber = ""
var oldnumber = "'" + number + "'"

if(oldnumber.length <= 8){
newnumber = oldnumber;
}

else if(oldnumber.length <= 9){
for(i=oldnumber.length;i>=0;i--)
{

if(i==2)
{
newnumber = comma + oldnumber.charAt(i) + newnumber;
}
else
{
newnumber = oldnumber.charAt(i) + newnumber;
}
}
}

else if(oldnumber.length <= 10){

for(i=oldnumber.length;i>=0;i--)
{

if(i==3)
{
newnumber = comma + oldnumber.charAt(i) + newnumber;
}
else
{
newnumber = oldnumber.charAt(i) + newnumber;
}
}
}

else if(oldnumber.length <= 11){
for(i=oldnumber.length;i>=0;i--)
{

if(i==4)
{
newnumber = comma + oldnumber.charAt(i) + newnumber;
}
else
{
newnumber = oldnumber.charAt(i) + newnumber;
}
}
}

else if(oldnumber.length <= 12){
for(i=oldnumber.length;i>=0;i--)
{

if(i==5 || i==2)
{
newnumber = comma + oldnumber.charAt(i) + newnumber;
}
else
{
newnumber = oldnumber.charAt(i) + newnumber;
}
}
}

else{
newnumber = oldnumber;
}

newnumber = newnumber.substr(1,newnumber.length -2);
newnumber = "$" + newnumber;

return (newnumber);

}


function oneperson_Validate(theForm)
{

var o
var m
var d = 0;
var firstchked = "";
var firstchkedLen = 0;
var strfirstchked = "";
var chked = "";
var chkedLen = 0;
var registergood = true;
var numberofchked = 0;
var indexofremoved = 0;
var removechked = "";
var partofchkArray2 = false;
var Meals = false;
var Full = false;
var chkArray3 = new Array;


for(c=0; c < theForm.elements.length; c++)
{
	
	if(theForm.elements[c].checked && theForm.elements[c].type=="checkbox")
	{	
	
		chkArray3[c] = theForm.elements[c].name;

		if(chkArray3[c].substr(0,7)=="chkMEAL")
		{
			Meals = true;
		}

		
		if(chkArray3[c].substr(0,5)=="chkFS")
		{
			Full = true;
		}

		
		if(chkArray3[c].substr(0,5)=="chkRM")
		{
			Full = true;
		}
		
		if(chkArray3[c].substr(0,9)=="chkDAYRLM")
		{
			Full = true;
		}

		if(Meals)
		{
			
			if(chkArray3[c].substr(0,5)=="chkFS" || chkArray3[c].substr(0,5)=="chkRM" || chkArray3[c].substr(0,9)=="chkDAYRLM")
				{
					alert("Full Session Packages come with meals." + "\n" + "Choose either Day Packages and choose Meals or Full Session Packages or Registration & Meals Packages.");
					delete chkArray3[c];
					document.forms['regform_frm'].elements[c].checked = false;
					break;
				}
		}

		
		if(Full)
		{
			
			if(chkArray3[c].substr(0,7)=="chkMEAL")
				{
					alert("Full Session and Registration & Meals Packages come with meals.");
					for(m=0; m < theForm.elements.length; m++)
					{
						if((theForm.elements[m].checked && theForm.elements[m].type=="checkbox") && (theForm.elements[m].name.substr(0,7)=="chkMEAL"))
						{
						delete chkArray3[m];
						document.forms['regform_frm'].elements[m].checked = false;
						}
					}
				}
		}
		
		


		numberofchked++;
		
		partofchkArray2 = false;

		if(chkArray2.length > 0){
		o = 0;	
		for(o in chkArray2)
		{
			
			if(chkArray2[o]==theForm.elements[c].name)
			{
				partofchkArray2 = true;
			}
			
		}
			if(!partofchkArray2)
				{
					removechked = theForm.elements[c].name;
					indexofremoved = c;
					chkArray2[c] = theForm.elements[c].name;
				}

		}
		else	{
			chkArray2[c] = theForm.elements[c].name;
			}



		if(d==0)
		{
			firstchked = theForm.elements[c].name;
			firstchkedLen = eval(firstchked.length - 1);
			strfirstchked = firstchked.substr(0, firstchkedLen);
			d++;
		}
		chked = theForm.elements[c].name;
		chkedLen = eval(chked.length - 1);
		

		if(chked.substr(0,chkedLen)!=strfirstchked && !Meals)
		{	
			alert("Please only register one person at a time.");
			delete chkArray3[indexofremoved];
			document.forms['regform_frm'].elements[removechked].checked = false;
			break;
		
		}
		

	}


}


	if(numberofchked==0)
		{

			chkArray2.length = 0;
		}


chkArray2 = chkArray3.slice();

chkArray3.length = 0;


return regform_Total(theForm);


}


</script>


</head>

<body>



<center><h1>HEADER1</h1></center>

<center>
<fieldset>
<legend><b>Directions</b></legend>
	<TABLE>
    <TR>
      <TD width="664" colspan="5" height="18"><b>How this online form works:</b><ol>

		<li>Start by filling in the &quot;Person Information&quot; below of the first 
		person in your family/group. This person will be considered the main 
		contact person for your family/group. If you are the only one, you can 
		disregard information about registering additional people.</li>
		<li>In the &quot;Registration Information&quot; section, check the appropriate 
		boxes for <b>only</b> the person represented in the &quot;Person Information&quot; 
		section on this page.</li>

		<li>If you are going to choose a &quot;Full Session&quot; package, the &quot;A
          La Carte&quot; 
		sections should not be filled in, and vice versa.</li>
		<li>When you are done filling in all of the appropriate sections, click 
		the &quot;Send Registration&quot; button at the bottom of the form.</li>
		<li>You will be prompted if you wish to register additional people under 
		your main contact registration. Click &quot;Yes&quot; to register another person 
		and &quot;No&quot; to proceed to finishing the registration.</li>

		<li>If you clicked &quot;Yes&quot;, your personal information will be copied over 
		to the next screen with the exception of some fields, and then you 
		should proceed to fill in the &quot;Person Information&quot; of the next person in 
		your group/family.</li>
		<li>The last step, if you have already clicked "No... Proceed to checkout", is to 
		choose a payment method.</li>
		</ol>
      </TD>
    </TR>

    </TABLE>
</fieldset>
</center>



<center>
<fieldset><br><br>
<legend><b>Person Information</b></legend>

<form action="RegForm.asp" method="post" name="regform_frm" id="regform_frm" onsubmit="javascript:return regform_Validator(this);" onclick="javascript:return oneperson_Validate(this);">

<TABLE>
    <tbody class="style1">

    <TR>
      <TD width="132" height="25">
        <p align="right"><B>&nbsp; First Name:</B></p>
      </TD>
      <TD width="185" height="25"><INPUT NAME="FirstName" SIZE=25 tabindex="1"></TD>
      <TD width="347" height="25" colspan="3"><font color="#FF0000">*</font>&nbsp;<b><font color="#000080"><i>
        signifies
        required field</i></font></b></TD>

    </TR>

    <TR>
      <TD width="132" height="25">
        <p align="right"><B>&nbsp; Last Name:</B></p>
      </TD>
      <TD width="185" height="25"><INPUT NAME="LastName" SIZE=25 tabindex="2" value=""></TD>
      <TD height="25"><font color="#FF0000">*</font></TD>

      <TD width="122" height="25">
      </TD>
      <TD width="185" height="25"></TD>
    </TR>
    
     <TR>
      <TD width="132" height="25">
        <p align="right"><B>&nbsp; Home Phone:</B></p>
      </TD>

      <TD width="185" height="25"><INPUT NAME="HomePhone" SIZE=12 maxlength="12" tabindex="3" value="">&nbsp;&nbsp;<font size="2">###-###-####</font></TD>
      <TD height="25"><font color="#FF0000">*</font></TD>
      <TD width="122" height="25">
      </TD>
      <TD width="185" height="25"></TD>
    </TR>

 	<TR>

      <TD width="132" height="25">
        <p align="right"><B>&nbsp; Zip Code:</B></p>
      </TD>
      <TD width="185" height="25"><INPUT NAME="Zip" SIZE=12 value="" tabindex="4"></TD>
      <TD height="25"><font color="#FF0000">*</font></TD>
      <TD width="122" height="25"></TD>
      <TD width="185" height="25"></TD>

    </TR>

 	<TR>
      <TD width="132" height="25">
        <p align="right"><B>&nbsp; Diversity Code:</B></p>
      </TD>
      <TD width="185" height="25"><select size="1" name="DivCode" tabindex="5" onchange="regform_frm.BahaiID.focus()";>
          <option selected>Make a Selection</option>

          <option value="A">Asian</option>
          <option value="B">Black</option>
          <option value="H">Hispanic</option>
          <option value="M">Multicultural</option>
          <option value="NA">Native American</option>
          <option value="O">Other</option>

          <option value="P">Persian</option>
          <option value="W">White</option>
        </select></TD>
      <TD height="25"><font color="#FF0000">*</font></TD>
      <TD width="122" height="25"><B>&nbsp;&nbsp;</B></TD>
      <TD width="185" height="25"></TD>
    </TR>

 	<TR>
      <TD width="132" height="25">
        <p align="right"><B>&nbsp; Are you Bahai:</B></p>
      </TD>
      <TD width="185" height="25"><input type="radio" value="1" checked name="optBahai" tabindex="6">Yes&nbsp;&nbsp; <input type="radio" name="optBahai" value="0" tabindex="8">No</TD>
      <TD height="25"><font color="#FF0000">*</font></TD>

      <TD width="122" height="25">
      </TD>
      <TD width="185" height="25"></TD>
    </TR>

 	<TR>
      <TD width="132" height="25">
        <p align="right"><B>&nbsp; Bahai ID:</B></p>

      </TD>
      <TD width="185" height="25"><INPUT NAME="BahaiID" SIZE=25 tabindex="7"></TD>
      <TD width="347" colspan="3" height="25"><i><font color="#FF0000">*&nbsp;</font>
        Required if Applicable</i></TD>
    </TR>
    
 	<TR>
      <TD width="132" height="17">
        <p align="right"><B>&nbsp; Birth Date:</B></p>

      </TD>
      <TD width="185" height="17"><INPUT NAME="BirthDate" SIZE=12 tabindex="8"><font size="2">&nbsp;
        mm/dd/yyyy</font></TD>
      <TD width="347" colspan="3" height="17"><i><font color="#FF0000">*</font>&nbsp;
        Required for under 26 years of age</i></TD>
    </TR>

	<TR>

      <TD width="132" height="21">
        <p align="right">
        <B> Alternate Phone:</B>
        </p>
      </TD>
      <TD width="185" height="21"><INPUT NAME="AlternatePhone" SIZE=12 value="" tabindex="9">&nbsp;&nbsp;<font size="2"><em>any format</em></font></TD>
      <TD height="21"></TD>

      <TD width="122" height="21"></TD>
      <TD width="185" height="21"></TD>
    </TR>

	<TR>
      <TD width="132" height="21">
        <p align="right">
        <B> Email:</B>

        </p>
      </TD>
      <TD width="185" height="21"><INPUT NAME="Email" SIZE=25 value="" tabindex="10"></TD>
      <TD width="347" colspan="3" height="25"><i><font color="#FF0000">*&nbsp;</font>
        <b>Required if you want invoice emailed to you</i></b></TD>
    </TR>

	<TR>

      <TD colspan="5" valign="bottom" style="height: 28px">
        <B> Special Needs/Notes for Registrars:</B>
      </TD>
    </TR>
    
	<TR>
      <TD height="21" colspan="5" align="center">
		<textarea  NAME="Notes" tabindex="11" style="width: 399px; height: 57px" rows="1" class="style2"></textarea></TD>

    </TR>

    
</TABLE>	
</br>
</center>

</br>
</br>
<center>

  <table border="1" width="84%">

    <tr>
      <td style="width: 7%"><INPUT NAME="OldRegNumber" SIZE=12 value="" type="hidden" style="border-style:solid; border-color:#FFFFFF" tabindex="500"></td>
      <td width="48%"><b><i><font color="#000080">FULL SESSION PACKAGES (includes lodging and meals)</font></i></b></td>
      <td width="43%" colspan="5" align="center"><i><font color="#FF0000"><b>Please check all of the days</br>you will be attending.</b></font></i></td>
    </tr>
    <tr>
      <td style="width: 7%"><b>Price</b></td>

      <td width="48%"><b>Package</b></td>
      <td width="8%"><b>Saturday</b></td>
      <td width="9%"><b>Sunday</b></td>
      <td width="8%"><b>Monday</b></td>
      <td width="9%"><b>Tuesday</b></td>
      <td width="9%"><b>Wednesday</b></td>

    </tr>
    <tr>
      <td style="width: 7%">$240.00</td>
      <td width="48%">Full Session (Adult)</td>
      <td width="8%"><input type="checkbox" name="chkFSAd1" value="240"></td>
      <td width="9%"><input type="checkbox" name="chkFSAd2" value="240"></td>
      <td width="8%"><input type="checkbox" name="chkFSAd3" value="240"></td>
      <td width="9%"><input type="checkbox" name="chkFSAd4" value="240"></td>

      <td width="9%"><input type="checkbox" name="chkFSAd5" value="240"></td>
    </tr>
    <tr>
      <td style="width: 7%">$240.00</td>
      <td width="48%">Full Session (Young Adult) 18 to 25 years old</td>
      <td width="8%"><input type="checkbox" name="chkFSYAd1" value="240"></td>
      <td width="9%"><input type="checkbox" name="chkFSYAd2" value="240"></td>
      <td width="8%"><input type="checkbox" name="chkFSYAd3" value="240"></td>

      <td width="9%"><input type="checkbox" name="chkFSYAd4" value="240"></td>
      <td width="9%"><input type="checkbox" name="chkFSYAd5" value="240"></td>
    </tr>
    <tr>
      <td style="width: 7%">$220.00</td>
      <td width="48%">Full Session (Youth) going into 9th -12th</td>
      <td width="8%"><input type="checkbox" name="chkFSYd1" value="220"></td>
      <td width="9%"><input type="checkbox" name="chkFSYd2" value="220"></td>

      <td width="8%"><input type="checkbox" name="chkFSYd3" value="220"></td>
      <td width="9%"><input type="checkbox" name="chkFSYd4" value="220"></td>
      <td width="9%"><input type="checkbox" name="chkFSYd5" value="220"></td>
    </tr>
    <tr>
      <td style="width: 7%">$200.00</td>
      <td width="48%">Full Session (Jr.Youth) going into 6th - 8th</td>
      <td width="8%"><input type="checkbox" name="chkFSJYd1" value="200"></td>

      <td width="9%"><input type="checkbox" name="chkFSJYd2" value="200"></td>
      <td width="8%"><input type="checkbox" name="chkFSJYd3" value="200"></td>
      <td width="9%"><input type="checkbox" name="chkFSJYd4" value="200"></td>
      <td width="9%"><input type="checkbox" name="chkFSJYd5" value="200"></td>
    </tr>
    <tr>
      <td style="width: 7%">$185.00</td>
      <td width="48%">Full Session (going into 4th or 5th grade)</td>

      <td width="8%"><input type="checkbox" name="chkFSC45d1" value="185"></td>
      <td width="9%"><input type="checkbox" name="chkFSC45d2" value="185"></td>
      <td width="8%"><input type="checkbox" name="chkFSC45d3" value="185"></td>
      <td width="9%"><input type="checkbox" name="chkFSC45d4" value="185"></td>
      <td width="9%"><input type="checkbox" name="chkFSC45d5" value="185"></td>
    </tr>
    <tr>
      <td style="width: 7%">$185.00</td>

      <td width="48%">Full Session (going into 2nd or 3rd grade)</td>
      <td width="8%"><input type="checkbox" name="chkFSC23d1" value="185"></td>
      <td width="9%"><input type="checkbox" name="chkFSC23d2" value="185"></td>
      <td width="8%"><input type="checkbox" name="chkFSC23d3" value="185"></td>
      <td width="9%"><input type="checkbox" name="chkFSC23d4" value="185"></td>
      <td width="9%"><input type="checkbox" name="chkFSC23d5" value="185"></td>
    </tr>
    <tr>

      <td style="width: 7%">$185.00</td>
      <td width="48%">Full Session (going into Kindergarten or 1st grade)</td>
      <td width="8%"><input type="checkbox" name="chkFSCK1d1" value="185"></td>
      <td width="9%"><input type="checkbox" name="chkFSCK1d2" value="185"></td>
      <td width="8%"><input type="checkbox" name="chkFSCK1d3" value="185"></td>
      <td width="9%"><input type="checkbox" name="chkFSCK1d4" value="185"></td>
      <td width="9%"><input type="checkbox" name="chkFSCK1d5" value="185"></td>
    </tr>

    <tr>
      <td style="width: 7%">$170.00</td>
      <td width="48%">Full Session (ages 3 &amp; 4)</td>
      <td width="8%"><input type="checkbox" name="chkFSCPSd1" value="170"></td>
      <td width="9%"><input type="checkbox" name="chkFSCPSd2" value="170"></td>
      <td width="8%"><input type="checkbox" name="chkFSCPSd3" value="170"></td>
      <td width="9%"><input type="checkbox" name="chkFSCPSd4" value="170"></td>

      <td width="9%"><input type="checkbox" name="chkFSCPSd5" value="170"></td>
    </tr>
    <tr>
      <td style="width: 7%">$ Free</td>
      <td width="48%">Full Session (2 &amp; under)</td>
      <td width="8%"><input type="checkbox" name="chkFSC2d1" value="0"></td>
      <td width="9%"><input type="checkbox" name="chkFSC2d2" value="0"></td>

      <td width="8%"><input type="checkbox" name="chkFSC2d3" value="0"></td>
      <td width="9%"><input type="checkbox" name="chkFSC2d4" value="0"></td>
      <td width="9%"><input type="checkbox" name="chkFSC2d5" value="0"></td>
    </tr>
   <tr>
      <td style="width: 7%">&nbsp;</td>
      <td width="48%" align="right"><font color="#000080"><b>Full Session Subtotal:</b></font></td>
      <td width="17%" colspan="2" align="center"><input type="text" id="FSsubtotal" name="FSsubtotal" READONLY size="16"></td>

      <td width="8%" colspan="3" class="style3">(if paid 
		after 6/20/2007) </td>
    </tr>
    <tr>
      <td width="9%" colspan="7" class="style3" valign="bottom" align="right">
		<span class="style4"><strong>Discounted Subtotals:</strong></span>&nbsp;
		<input type="text" id="FSsubtotal2" name="FSsubtotal2" READONLY size="16">&nbsp; 
		(if paid on or before 3/31)&nbsp;&nbsp; 
		&nbsp;

		<input type="text" id="FSsubtotal3" name="FSsubtotal3" READONLY size="16">&nbsp; 
		(if paid between 4/1 and 6/20)</td>
    </tr>
    <tr>
      <td width="9%" colspan="7" class="style3">&nbsp;</td>
    </tr>
    <tr>
      <td style="width: 7%">&nbsp;</td>
      <td width="48%" class="style4"><em><strong>REGISTRATION AND MEALS ONLY 
		PACKAGES</strong></em></td>

      <td width="8%">&nbsp;</td>
      <td width="9%">&nbsp;</td>
      <td width="8%">&nbsp;</td>
      <td width="9%">&nbsp;</td>
      <td width="9%">&nbsp;</td>
    </tr>
    <tr>
      <td style="width: 7%"><b>Price</b></td>

      <td width="48%"><b>Package</b></td>
      <td width="8%"><b>Saturday</b></td>
      <td width="9%"><b>Sunday</b></td>
      <td width="8%"><b>Monday</b></td>
      <td width="9%"><b>Tuesday</b></td>
      <td width="9%"><b>Wednesday</b></td>

    </tr>
    <tr>
      <td style="width: 7%">$180.00</td>
      <td width="48%">&nbsp;Adult</td>
      <td width="8%"><input type="checkbox" name="chkRMAd1" value="180"></td>
      <td width="9%"><input type="checkbox" name="chkRMAd2" value="180"></td>
      <td width="8%"><input type="checkbox" name="chkRMAd3" value="180"></td>
      <td width="9%"><input type="checkbox" name="chkRMAd4" value="180"></td>

      <td width="9%"><input type="checkbox" name="chkRMAd5" value="180"></td>
    </tr>
    <tr>
      <td style="width: 7%">$180.00</td>
      <td width="48%">Young Adult 18 to 25 years old</td>
      <td width="8%"><input type="checkbox" name="chkRMYAd1" value="180"></td>
      <td width="9%"><input type="checkbox" name="chkRMYAd2" value="180"></td>
      <td width="8%"><input type="checkbox" name="chkRMYAd3" value="180"></td>

      <td width="9%"><input type="checkbox" name="chkRMYAd4" value="180"></td>
      <td width="9%"><input type="checkbox" name="chkRMYAd5" value="180"></td>
    </tr>
    <tr>
      <td style="width: 7%">$140.00</td>
      <td width="48%">Youth&nbsp; going into 9th -12th</td>
      <td width="8%"><input type="checkbox" name="chkRMYd1" value="140"></td>

      <td width="9%"><input type="checkbox" name="chkRMYd2" value="140"></td>
      <td width="8%"><input type="checkbox" name="chkRMYd3" value="140"></td>
      <td width="9%"><input type="checkbox" name="chkRMYd4" value="140"></td>
      <td width="9%"><input type="checkbox" name="chkRMYd5" value="140"></td>
    </tr>
    <tr>
      <td style="width: 7%">$120.00</td>
      <td width="48%">Jr.Youth going into 6th - 8th</td>

      <td width="8%"><input type="checkbox" name="chkRMJYd1" value="120"></td>
      <td width="9%"><input type="checkbox" name="chkRMJYd2" value="120"></td>
      <td width="8%"><input type="checkbox" name="chkRMJYd3" value="120"></td>
      <td width="9%"><input type="checkbox" name="chkRMJYd4" value="120"></td>
      <td width="9%"><input type="checkbox" name="chkRMJYd5" value="120"></td>
    </tr>
    <tr>
      <td style="width: 7%">$120.00</td>

      <td width="48%">Child (going into 4th or 5th grade)</td>
      <td width="8%"><input type="checkbox" name="chkRMC45d1" value="120"></td>
      <td width="9%"><input type="checkbox" name="chkRMC45d2" value="120"></td>
      <td width="8%"><input type="checkbox" name="chkRMC45d3" value="120"></td>
      <td width="9%"><input type="checkbox" name="chkRMC45d4" value="120"></td>
      <td width="9%"><input type="checkbox" name="chkRMC45d5" value="120"></td>
    </tr>
    <tr>

      <td style="width: 7%">$120.00</td>
      <td width="48%">Child (going into 2nd or 3rd grade)</td>
      <td width="8%"><input type="checkbox" name="chkRMC23d1" value="120"></td>
      <td width="9%"><input type="checkbox" name="chkRMC23d2" value="120"></td>
      <td width="8%"><input type="checkbox" name="chkRMC23d3" value="120"></td>
      <td width="9%"><input type="checkbox" name="chkRMC23d4" value="120"></td>
      <td width="9%"><input type="checkbox" name="chkRMC23d5" value="120"></td>
    </tr>

    <tr>
      <td style="width: 7%">$120.00</td>
      <td width="48%">Child (going into Kindergarten or 1st grade)</td>
      <td width="8%"><input type="checkbox" name="chkRMCK1d1" value="120"></td>
      <td width="9%"><input type="checkbox" name="chkRMCK1d2" value="120"></td>
      <td width="8%"><input type="checkbox" name="chkRMCK1d3" value="120"></td>
      <td width="9%"><input type="checkbox" name="chkRMCK1d4" value="120"></td>
      <td width="9%"><input type="checkbox" name="chkRMCK1d5" value="120"></td>

    </tr>
    <tr>
      <td style="width: 7%">$120.00</td>
      <td width="48%">Child (ages 3 &amp; 4)</td>
      <td width="8%"><input type="checkbox" name="chkRMCPSd1" value="120"></td>
      <td width="9%"><input type="checkbox" name="chkRMCPSd2" value="120"></td>
      <td width="8%"><input type="checkbox" name="chkRMCPSd3" value="120"></td>

      <td width="9%"><input type="checkbox" name="chkRMCPSd4" value="120"></td>
      <td width="9%"><input type="checkbox" name="chkRMCPSd5" value="120"></td>
    </tr>
    <tr>
      <td style="width: 7%">$ Free</td>
      <td width="48%">Child (2 &amp; under)</td>
      <td width="8%"><input type="checkbox" name="chkRMC2d1" value="0"></td>

      <td width="9%"><input type="checkbox" name="chkRMC2d2" value="0"></td>
      <td width="8%"><input type="checkbox" name="chkRMC2d3" value="0"></td>
      <td width="9%"><input type="checkbox" name="chkRMC2d4" value="0"></td>
      <td width="9%"><input type="checkbox" name="chkRMC2d5" value="0"></td>
    </tr>
   <tr>
      <td style="width: 7%">&nbsp;</td>
      <td width="48%" align="right"><font color="#000080"><strong>Registration 
		and Meals</strong> <b>Subtotal:</b></font></td>

      <td width="17%" colspan="2" align="center"><input type="text" id="RMsubtotal" name="RMsubtotal" READONLY size="16"></td>
      <td width="8%" colspan="3" class="style3">(if paid 
		after 6/20/2007) </td>
    </tr>
    <tr>
      <td width="9%" colspan="7" class="style3" valign="bottom" align="right">
		<span class="style4"><strong>Discounted Subtotals:</strong></span>&nbsp;
		<input type="text" id="RMsubtotal2" name="RMsubtotal2" READONLY size="16">&nbsp; 
		(if paid on or before 3/31)&nbsp;&nbsp; 
		&nbsp;

		<input type="text" id="RMsubtotal3" name="RMsubtotal3" READONLY size="16">&nbsp; 
		(if paid between 4/1 and 6/20)</td>
    </tr>
    <tr>
      <td width="9%" colspan="7" class="style3">&nbsp;</td>
    </tr>
    <tr>
      <td style="width: 7%">&nbsp;</td>
      <td width="48%"><i><b><font color="#000080">A LA CARTE PACKAGES</font></b></i></td>

      <td width="8%">&nbsp;</td>
      <td width="9%">&nbsp;</td>
      <td width="8%">&nbsp;</td>
      <td width="9%">&nbsp;</td>
      <td width="9%">&nbsp;</td>
    </tr>
    <tr>
      <td style="width: 7%"><b>Price</b></td>

      <td width="48%"><b>Package</b></td>
      <td width="8%"><b>Saturday</b></td>
      <td width="9%"><b>Sunday</b></td>
      <td width="8%"><b>Monday</b></td>
      <td width="9%"><b>Tuesday</b></td>
      <td width="9%"><b>Wednesday</b></td>

    </tr>
    <tr>
      <td style="width: 7%">$ 70.00</td>
      <td width="48%">Day Rate - Registration, Lodging and Meals</td>
      <td width="8%"><input type="checkbox" name="chkDAYRLMd1" value="70"></td>
      <td width="9%"><input type="checkbox" name="chkDAYRLMd2" value="70"></td>
      <td width="8%"><input type="checkbox" name="chkDAYRLMd3" value="70"></td>
      <td width="9%"><input type="checkbox" name="chkDAYRLMd4" value="70"></td>

      <td width="9%"><input type="checkbox" name="chkDAYRLMd5" value="70"></td>
    </tr>
    <tr>
      <td style="width: 7%">$ 65.00</td>
      <td width="48%">Day Rate (Youth) - Registration, Lodging and Meals</td>
      <td width="8%"><input type="checkbox" name="chkDAYRLMYd1" value="65"></td>
      <td width="9%"><input type="checkbox" name="chkDAYRLMYd2" value="65"></td>
      <td width="8%"><input type="checkbox" name="chkDAYRLMYd3" value="65"></td>

      <td width="9%"><input type="checkbox" name="chkDAYRLMYd4" value="65"></td>
      <td width="9%"><input type="checkbox" name="chkDAYRLMYd5" value="65"></td>
    </tr>
    <tr>
      <td style="width: 7%">$ 60.00</td>
      <td width="48%">Day Rate (Jr.Youth) - Registration, Lodging &amp; Meals</td>
      <td width="8%"><input type="checkbox" name="chkDAYRLMJd1" value="60"></td>

      <td width="9%"><input type="checkbox" name="chkDAYRLMJd2" value="60"></td>
      <td width="8%"><input type="checkbox" name="chkDAYRLMJd3" value="60"></td>
      <td width="9%"><input type="checkbox" name="chkDAYRLMJd4" value="60"></td>
      <td width="9%"><input type="checkbox" name="chkDAYRLMJd5" value="60"></td>
    </tr>
    <tr>
      <td style="width: 7%">$ 55.00</td>
      <td width="48%">Day Rate (Child) - Registration, Lodging and Meals</td>

      <td width="8%"><input type="checkbox" name="chkDAYRLMCd1" value="55"></td>
      <td width="9%"><input type="checkbox" name="chkDAYRLMCd2" value="55"></td>
      <td width="8%"><input type="checkbox" name="chkDAYRLMCd3" value="55"></td>
      <td width="9%"><input type="checkbox" name="chkDAYRLMCd4" value="55"></td>
      <td width="9%"><input type="checkbox" name="chkDAYRLMCd5" value="55"></td>
    </tr>
    <tr>
      <td style="width: 7%">$ 53.00</td>

      <td width="53%">Day Rate (All Ages) - Registration and Lodging Only</td>
      <td width="8%"><input type="checkbox" name="chkDAYRLd1" value="53"></td>
      <td width="9%"><input type="checkbox" name="chkDAYRLd2" value="53"></td>
      <td width="8%"><input type="checkbox" name="chkDAYRLd3" value="53"></td>
      <td width="9%"><input type="checkbox" name="chkDAYRLd4" value="53"></td>
      <td width="9%"><input type="checkbox" name="chkDAYRLd5" value="53"></td>
    </tr>
    <tr>

      <td style="width: 7%">$ 30.00</td>
      <td width="48%">Day Rate (All Ages) - Registration Only</td>
      <td width="8%"><input type="checkbox" name="chkDAYd1" value="30"></td>
      <td width="9%"><input type="checkbox" name="chkDAYd2" value="30"></td>
      <td width="8%"><input type="checkbox" name="chkDAYd3" value="30"></td>
      <td width="9%"><input type="checkbox" name="chkDAYd4" value="30"></td>
      <td width="9%"><input type="checkbox" name="chkDAYd5" value="30"></td>
    </tr>

   <tr>
      <td style="width: 7%">&nbsp;</td>
      <td width="48%" align="right"><font color="#000080"><b>Day Registration Subtotal:</b></font></td>
      <td width="17%" colspan="2" align="center"><input type="text" id="DAYsubtotal" name="DAYsubtotal" READONLY size="16"></td>
      <td width="8%" colspan="3">(if paid 
		after 6/20/2007) </td>
    </tr>
    <tr>
      <td width="9%" colspan="7" align="right">

		<span class="style4"><strong>Discounted Subtotals:</strong></span>&nbsp;
		<input type="text" id="DAYsubtotal2" name="DAYsubtotal2" READONLY size="16">&nbsp; 
		(if paid on or before 3/31)&nbsp;&nbsp; 
		&nbsp;
		<input type="text" id="DAYsubtotal3" name="DAYsubtotal3" READONLY size="16">&nbsp; 
		(if paid between 4/1 and 6/20)</td>
    </tr>
      <tr>
      <td width="9%" colspan="7">&nbsp;</td>

    </tr>
    <tr>
      <td width="100%" colspan="7">&nbsp;<b><i>Important: <font color="#FF0000"> Do not buy meals if
        your package includes them.</font></i></b></td>
    </tr>
    <tr>
      <td style="width: 7%">&nbsp;</td>
      <td width="48%"><i><b><font color="#000080">A LA CARTE MEALS</font></b></i></td>

      <td width="8%">&nbsp;</td>
      <td width="9%">&nbsp;</td>
      <td width="8%">&nbsp;</td>
      <td width="9%">&nbsp;</td>
      <td width="9%">&nbsp;</td>
    </tr>
    <tr>
      <td style="width: 7%"><b>Price</b></td>

      <td width="48%"><b>Package</b></td>
      <td width="8%"><b>Saturday</b></td>
      <td width="9%"><b>Sunday</b></td>
      <td width="8%"><b>Monday</b></td>
      <td width="9%"><b>Tuesday</b></td>
      <td width="9%"><b>Wednesday</b></td>

    </tr>
    <tr>
      <td style="width: 7%">$&nbsp; 7.00</td>
      <td width="48%">Breakfast (All Ages)</td>
      <td width="8%">&nbsp;</td>
      <td width="9%"><input type="checkbox" name="chkMEALBd2" value="7"></td>
      <td width="8%"><input type="checkbox" name="chkMEALBd3" value="7"></td>

      <td width="9%"><input type="checkbox" name="chkMEALBd4" value="7"></td>
      <td width="9%"><input type="checkbox" name="chkMEALBd5" value="7"></td>
    </tr>
    <tr>
      <td style="width: 7%">$&nbsp; 7.00</td>
      <td width="48%">Lunch (All Ages)</td>
      <td width="8%">&nbsp;</td>

      <td width="9%"><input type="checkbox" name="chkMEALLd2" value="7"></td>
      <td width="8%"><input type="checkbox" name="chkMEALLd3" value="7"></td>
      <td width="9%"><input type="checkbox" name="chkMEALLd4" value="7"></td>
      <td width="9%"><input type="checkbox" name="chkMEALLd5" value="7"></td>
    </tr>
    <tr>
      <td style="width: 7%">$&nbsp; 7.00</td>

      <td width="48%">Dinner (All Ages)</td>
      <td width="8%"><input type="checkbox" name="chkMEALDd1" value="7"></td>
      <td width="9%"><input type="checkbox" name="chkMEALDd2" value="7"></td>
      <td width="8%"><input type="checkbox" name="chkMEALDd3" value="7"></td>
      <td width="9%"><input type="checkbox" name="chkMEALDd4" value="7"></td>
      <td width="9%">&nbsp;</td>
    </tr>
   <tr>

      <td style="width: 7%">&nbsp;</td>
      <td width="48%" align="right"><font color="#000080"><b>Meals Subtotal:</b></font></td>
      <td width="17%" colspan="2" align="center"><input type="text" id="Mealsubtotal" name="Mealsubtotal" READONLY size="16"></td>
      <td width="8%" colspan="3">(if paid 
		after 6/20/2007) </td>
    </tr>
    <tr>
      <td width="9%" colspan="7" align="right">
		<span class="style4"><strong>Discounted Subtotals:</strong></span>&nbsp;

		<input type="text" id="Mealsubtotal2" name="Mealsubtotal2" READONLY size="16">&nbsp; 
		(if paid on or before 3/31)&nbsp;&nbsp; 
		&nbsp;
		<input type="text" id="Mealsubtotal3" name="Mealsubtotal3" READONLY size="16">&nbsp; 
		(if paid between 4/1 and 6/20)</td>
    </tr>
    <tr>
      <td width="9%" colspan="7">&nbsp;</td>
    </tr>

   <tr>
      <td style="width: 7%">&nbsp;</td>
      <td width="48%" align="right"><font color="#000080"><b>Total:</b></font></td>
      <td width="17%" colspan="2" align="center"><input type="text" id="Total" name="Total" READONLY size="16"></td>
      <td width="8%" colspan="3">&nbsp;</td>
    </tr>

   <tr>

      <td style="width: 7%" colspan="7" align="right">
		<span class="style4"><strong>Discounted Totals:</strong></span>&nbsp;
		<input type="text" id="Total2" name="Total2" READONLY size="16">&nbsp; 
		(if paid on or before 3/31)&nbsp;&nbsp; 
		&nbsp;
		<input type="text" id="Total3" name="Total3" READONLY size="16">&nbsp; 
		(if paid between 4/1 and 6/20)</td>
    </tr>
  </table></br>

</fieldset>

  <p>

  <BR>

  &nbsp;
 

  <INPUT TYPE="Submit" NAME="cmdSubmit" VALUE="Send Registration">

  </p>

</FORM>

</center>

</body>

</html>

Thanks much!
 
Have you viewed the Javascript Error Console in FF to determine where your problem is?

If you haven't do so, then post the relevant code.

[small]"Mom........MEATLOAF!!!! DANG!!!![/small]
<.
 
Error: [Exception... "'Permission denied to set property XULElement.selectedIndex' when calling method: [nsIAutoCompletePopup::selectedIndex]" nsresult: "0x8057001e (NS_ERROR_XPC_JS_THREW_STRING)" location: "JS frame :: :: regform_Validator :: line 56" data: no]
Source File: Line: 56
 
It's a Permission denied error. Check to make sure your Iuserxxx has the right permissions and possibley your aspnet user.
 
To kss444:

With due respect, I left out part of the equation.

I didn't get that error when I clicked on any of the checkboxes.

I only got that error when another javascript function ran, and even with the error, it behaved the way it was supposed to.

Also, I understand what you mean by a permissions error, and the IUSER account, but, this is a client script.

Also, if it were an IUSER or aspnet issue, wouldn't I be experiencing the same problem with Internet Explorer?

Thanks again.
 
Hey,

I found my problem.

I had the

Code:
onclick="javascript:return oneperson_Validate(this);">

When I should have had

Code:
onclick="javascript: oneperson_Validate(this);">

without the return, because I wasn't returning anything.

Thanks for all the help.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top