Solved

runtime error

Posted on 2004-09-15
18
216 Views
Last Modified: 2013-12-24
Hi i get this runtime error in IE and only in IE
runtime error,
line 352
error:synthax error
do you which to debug

and it goes to the page and display it correctly no matter whether i press yes or no.
i looked at the code and nothing seems to be wrong
here is the js code
<script language="JavaScript">
<!--

      /*  First we set up some global variables to be shared among the functions. */
var message      /*  Variable used to build the alert message string. */
var fieldtofocus //  Stores the name of the data field to receive the focus.


/*  function that checks to see if the form has been filled out correctly

When the Submit button is clicked, the areFieldsReady()  function
is called before the form is sent for processing. Hence, validation
prior to the page being completed.  */

function areFieldsReady(form) {
      passed = true; /* This variable is set to "false" if the mail is not ready. */
      fieldtofocus = ""; /* Data field to receive the focus after the alert is closed. */
      
            /*  Set up the initial string of the alert message. The "\n"
            creates a new line for the text string.  */

      message ="The following Fields are missing or incorrect: \n \n";
            
            
            //var AccCheck = isAccCheck(Acname);
            //var Acname = document.Payment.AccName;
            var inputStr = form.AccName.value;
            
            
      
            //Checks the first required input field for an empty string.
       if (form.Early_Bird.value == "select from list" && form.NReg.value == "select from list" &&
            form.NReg.value =="select from list") {
                  // If the field is empty, add this to the message.
                message += "-  You Must Choose Your Registration Fee! \n \n";
                  
            passed = false;
                   /*Set this as the input field to have the focus after
                        the alert message. */                                  
            fieldtofocus = form.Early_Bird;
          }
      
       if (form.Early_Bird.value !== "select from list" && form.NReg.value !== "select from list" &&
              form.NReg.value !=="select from list")
       {
                  // If the field is empty, add this to the message.
                message += "-  You Should Choose Only One Registration Fee! \n \n";
                  
            passed = false;
                   /*Set this as the input field to have the focus after
                        the alert message. */                                  
            fieldtofocus = form.Early_Bird;
          }
            /* If a number for accopanying persons exist, check to see if their names where entered */
          if((form.AdultCompanion.value > 0 || form.ChildCompanion.value > 0) && (inputStr.search('name1') != -1 || form.AccName.value == "") ) {
                
                   message += "- You did not Type in the Name(s) of Accompanying Person(s)! \n \n";
                                     
                                    
                  passed = false;
                  if (fieldtofocus == ""){fieldtofocus = form.AccName;}
        }
        
      if (form.fiveSrooms.value == 0 && form.fiveDrooms.value == 0 && form.fourSrooms.value == 0 && form.fourDrooms.value == 0 && form.threeSrooms.value == 0 && form.threeDrooms.value == 0) {
                message += "-  Please Choose Your Accommodation \n \n";
            passed = false;
            if (fieldtofocus == "")  {fieldtofocus = form.fiveSrooms;}
        }
             
      if (form.ArrivalDate.value == "select from list") {
                  message += "-  You Must Indicate Your Arraival Date! \n \n";
                  
            passed = false;
            if (fieldtofocus == ""){fieldtofocus = form.ArrivalDate;}
          }

      if (form.ArrivalDate.value != "select from list" && form.DepartureDate.value == "select from list") {
                  message += "-  You Must Indicate Your Departure Date! \n \n";
                  
            passed = false;
            if (fieldtofocus == ""){fieldtofocus = form.DepartureDate;}
          }
      
      
      if (passed == false)  {
            fixFieldInfo(message, fieldtofocus);
      }
            /*  We need to return a "true" to the form's submit so that it will send
            the form. If a "false" is returned, nothing happens with the form
            submittal.  */

      return passed;
}
      
      /*   send out the message with the concatenated message strings and the field to receive
the cursor (focus) after the alert message is closed.*/

function fixFieldInfo(message, fieldtofocus){
      alert(message);
      fieldtofocus.focus();
}
// -->
</script>

can any body help
0
Comment
Question by:MMsabry
  • 10
  • 5
  • 2
  • +1
18 Comments
 
LVL 17

Expert Comment

by:Tacobell777
Comment Utility
Doesn't give me an error, how about installing microsoft script debugger? It will show you exactly where the problem lies..
0
 

Author Comment

by:MMsabry
Comment Utility
where do i get that?
0
 
LVL 35

Expert Comment

by:mrichmon
Comment Utility
I bet there is an error in other browsers.  They just hide them by default.

It is probably a javascript error.

Load the page in Mozilla or Firefox and type

javascript:

into the URL.  It will bring up the javascript console and any error messages that you are getting that are not being displayed.

It is much easier to debug there....
0
 
LVL 35

Expert Comment

by:mrichmon
Comment Utility
Also post a link to the page or the whole code.

Tacobell may have not gotten the bug because it could have to do with the html of the page which you didn't post.
0
 

Author Comment

by:MMsabry
Comment Utility
how should i type the javascript in the url
something like this
/page.cfm?javascript:
0
 
LVL 35

Expert Comment

by:mrichmon
Comment Utility
nope just

javascript:

and that is it

no http either
0
 
LVL 17

Assisted Solution

by:Tacobell777
Tacobell777 earned 75 total points
Comment Utility
0
 
LVL 9

Expert Comment

by:Jerry_Pang
Comment Utility
your javascript has only 104 lines.

the error is not on that javascript, probably on the html page.
onclick, onload, or sumthing like that. or probably on the different javascript

enable the javasript debuger is on
tools, internet option,advance
on browsing
uncheck - disable javascript debuggine
check - display notification for every script error
0
 

Author Comment

by:MMsabry
Comment Utility
you wanted the full code, here you go, it says the error on line 356, chr 1. i still cannot see it

<cfif IsDefined("URL.MM_logout") AND URL.MM_logout EQ "1">
  <cflock scope="Session" type="Exclusive" timeout="30" throwontimeout="no">
    <cfset Session.MM_Username="">
    <cfset Session.MM_UserAuthorization="">
  </cflock>
  <cfset MM_logoutRedirectPage="logpage.cfm">
  <cfif MM_logoutRedirectPage EQ "">
    <cfset MM_logoutRedirectPage=CGI.SCRIPT_NAME>
  </cfif>
  <cfset MM_logoutQuery=ListDeleteAt(CGI.QUERY_STRING,ListContainsNoCase(CGI.QUERY_STRING,"MM_logout=","&"),"&")>
  <cfif MM_logoutQuery NEQ "">
    <cfif Find("?",MM_logoutRedirectPage) EQ 0>
      <cfset MM_logoutRedirectPage=MM_logoutRedirectPage & "?" & MM_logoutQuery>
      <cfelse>
      <cfset MM_logoutRedirectPage=MM_logoutRedirectPage & "&" & MM_logoutQuery>
    </cfif>
  </cfif>
  <cflocation url="#MM_logoutRedirectPage#" addtoken="no">
</cfif>
<cflock scope="Session" type="ReadOnly" timeout="30" throwontimeout="no">
  <cfset MM_Username=Iif(IsDefined("Session.MM_Username"),"Session.MM_Username",DE(""))>
  <cfset MM_UserAuthorization=Iif(IsDefined("Session.MM_UserAuthorization"),"Session.MM_UserAuthorization",DE(""))>
</cflock>
<cfif MM_Username EQ "">
  <cfset MM_referer=CGI.SCRIPT_NAME>
  <cfif CGI.QUERY_STRING NEQ "">
    <cfset MM_referer=MM_referer & "?" & CGI.QUERY_STRING>
  </cfif>
  <cfset MM_failureURL="errorpage.cfm?accessdenied=" & URLEncodedFormat(MM_referer)>
  <cflocation url="#MM_failureURL#" addtoken="no">
</cfif>
<cfset CurrentPage=GetFileFromPath(GetTemplatePath())>
<!--- Time functions --->
<cfset comparedate= DateCompare(dateformat(now()), "29-Oct-05", "d")>
<cfset comparedate1= DateCompare(dateformat(now()), "29-Nov-05", "d")>

<!--- Query the developing countries--->

<cflock throwontimeout="no" type="readonly" scope="session" timeout="10">
      <cfquery name="DevCountries" datasource="#request.MyDSN#" password="#request.Mypassword#" username="#request.myusername#">
            Select Country From DevCountries
            Where Country='#Session.PartAct.Pinfo[8]#'
      </cfquery>
</cflock>
<cfif isdefined('form.submit')>
<cfset Acclist="#form.AccName#">
<cfset Accarray=listtoarray(Acclist,",")>
</cfif>
<script language="JavaScript">
<!--

      /*  First we set up some global variables to be shared among the functions. */
var message      /*  Variable used to build the alert message string. */
var fieldtofocus //  Stores the name of the data field to receive the focus.


/*  function that checks to see if the form has been filled out correctly

When the Submit button is clicked, the areFieldsReady()  function
is called before the form is sent for processing. Hence, validation
prior to the page being completed.  */

function areFieldsReady(form) {
      passed = true; /* This variable is set to "false" if the mail is not ready. */
      fieldtofocus = ""; /* Data field to receive the focus after the alert is closed. */
      
            /*  Set up the initial string of the alert message. The "\n"
            creates a new line for the text string.  */

      message ="The following Fields are missing or incorrect: \n \n";
            
            
            //var AccCheck = isAccCheck(Acname);
            //var Acname = document.Payment.AccName;
            var inputStr = form.AccName.value;
            
            
      
            //Checks the first required input field for an empty string.
       if (form.Early_Bird.value == "select from list" && form.NReg.value == "select from list" &&
            form.NReg.value =="select from list") {
                  // If the field is empty, add this to the message.
                message += "-  You Must Choose Your Registration Fee! \n \n";
                  
            passed = false;
                   /*Set this as the input field to have the focus after
                        the alert message. */                                  
            fieldtofocus = form.Early_Bird;
          }
      
       if (form.Early_Bird.value !== "select from list" && form.NReg.value !== "select from list" &&
              form.NReg.value !=="select from list")
       {
                  // If the field is empty, add this to the message.
                message += "-  You Should Choose Only One Registration Fee! \n \n";
                  
            passed = false;
                   /*Set this as the input field to have the focus after
                        the alert message. */                                  
            fieldtofocus = form.Early_Bird;
          }
            /* If a number for accopanying persons exist, check to see if their names where entered */
          if((form.AdultCompanion.value > 0 || form.ChildCompanion.value > 0) && (inputStr.search('name1') != -1 || form.AccName.value == "") ) {
                
                   message += "- You did not Type in the Name(s) of Accompanying Person(s)! \n \n";
                                     
                                    
                  passed = false;
                  if (fieldtofocus == ""){fieldtofocus = form.AccName;}
        }
        
      if (form.fiveSrooms.value == 0 && form.fiveDrooms.value == 0 && form.fourSrooms.value == 0 && form.fourDrooms.value == 0 && form.threeSrooms.value == 0 && form.threeDrooms.value == 0) {
                message += "-  Please Choose Your Accommodation \n \n";
            passed = false;
            if (fieldtofocus == "")  {fieldtofocus = form.fiveSrooms;}
        }
             
      if (form.ArrivalDate.value == "select from list") {
                  message += "-  You Must Indicate Your Arraival Date! \n \n";
                  
            passed = false;
            if (fieldtofocus == ""){fieldtofocus = form.ArrivalDate;}
          }

      if (form.ArrivalDate.value != "select from list" && form.DepartureDate.value == "select from list") {
                  message += "-  You Must Indicate Your Departure Date! \n \n";
                  
            passed = false;
            if (fieldtofocus == ""){fieldtofocus = form.DepartureDate;}
          }
      
      
      if (passed == false)  {
            fixFieldInfo(message, fieldtofocus);
      }
            /*  We need to return a "true" to the form's submit so that it will send
            the form. If a "false" is returned, nothing happens with the form
            submittal.  */

      return passed;
}
      
      /*   send out the message with the concatenated message strings and the field to receive
the cursor (focus) after the alert message is closed.*/

function fixFieldInfo(message, fieldtofocus){
      alert(message);
      fieldtofocus.focus();
}

//function AccNamefocous(){ document.Payment.AccName.selstart = 1; document.Payment.AccName.sellength = 5;}
// -->
</script>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta name="title" content="conf">
<meta name="author" content="sabry">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta http-equiv="keywords" content="">
<meta http-equiv="description" content="">
<meta name="robots" content="all">
<meta name="revisit" content="7      days">
<title>Registration</title>

<style type="text/css">
<!--
@import url(../Styles/one.css);
body {
      background-color: #999999;
}
a:link {
      color: #993366;
      text-decoration: none;
}
a:visited {
      text-decoration: none;
}
a:hover {
      text-decoration: none;
      color: #6633CC;
}
a:active {
      text-decoration: none;
}
-->
</style>
</head>
<body>
<form name="Payment" method="post" action="../payment/conf.cfm" onSubmit="return areFieldsReady(this)">
<table width="718" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><table width="718" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td></td>
      </tr>
      <tr>
        <td bgcolor="#BEABA7"><table width="616" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
            <tr>
              <td width="369" height="47" align="center" valign="middle" bgcolor="#BEABA7"><p align="left" class="stylemidwhite"><a href="mailto:xyz@xyz.com">Send a request for the pdf form</a></p></td>
              <td width="247" bgcolor="#BEABA7" align="right" class="stylesmaller">Last Updated
                  <!-- #BeginDate format:Am1 -->September 16, 2004<!-- #EndDate --></td>
            </tr>
            <tr>
              <td colspan="2" align="center" valign="middle"><p></p>
              <br>
              <br>
              <span class="style1bold">title text
                    <br>
              more text</span>
              <p><img name="logo" src="image.png" width="105" height="86" alt=""></p>
              <p class="stylesmaller">Conference <span class="stylesmaller2">Registration Form </span></p>
              <p></p>
                    </td>
            </tr>
           
            <tr>
                                                      <td height="19" colspan="2" align="right"><p class="stylesmallest2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                                                      &nbsp;&nbsp;</p>
                                                      </td>
                                                </tr>
                                                <tr>
                                                  <td height="19" colspan="2" align="center" valign="middle">
                                                            <table width="95%" border="0" align="center" cellpadding="0" cellspacing="4">
                                                              <tbody>
                                                                  <tr bgcolor="#EDEAE9">
                                                                    <td width="155" height="25" align="left" valign="top" bgcolor="#EDEAE9">
                                                                          <div align="left"><span class="stylesmaller">
                                                                          <br />
                                                                          &nbsp;Participant's Details: </span>
                                                                          <span class="stylesmallestred"></span></div>
                                                                    </td>
                                                                    <td width="283" align="center" valign="middle">
                                                                          <cflock name="session" type="readonly" timeout="10">
                                                                              <cfoutput>
                                                                                <div align="justify">
                                                                                  <br />
                                                                                  <div class="styleitalic">#Session.PartAct.Pinfo[1]#&nbsp;#Session.PartAct.Pinfo[2]#&nbsp;#Session.PartAct.Pinfo[3]#&nbsp; #Session.PartAct.Pinfo[4]#<br />
                                                          #Session.PartAct.Pinfo[9]#<br />
                                                          #Session.PartAct.Pinfo[10]#<br />
                                                          #Session.PartAct.Pinfo[11]#<br />
                                                          #Session.PartAct.Pinfo[12]#<br />
                                                          #Session.PartAct.Pinfo[7]#&nbsp;#Session.PartAct.Pinfo[6]#<br />
                                                          #Session.PartAct.Pinfo[8]#<br />
                                                          #Session.PartAct.Pinfo[15]# <br />
                                                                                    </div>
                                                                                </div>
                                                                              </cfoutput>
                                                                        </cflock>
                                                                    </td>
                                                                    <td width="128" align="center" valign="top"><br />
                                                                          <div align="left" >
                                                                              <span class="stylemiddarker">
                                                                                      <cfoutput> #Dateformat(now())#</cfoutput>
                                                                          </span>
                                                                        </div>
                                                                    </td>
                                                                  </tr>
                                                              </tbody>
                                                        </table>
                                                  </td>
                                                </tr>
                                                <tr bgcolor="#FFFFFF">
                                                      <td height="19" colspan="2" align="center" valign="middle">
                                                  <br>
                                                  </td>
                                                </tr>
            <tr>
              <td colspan="2" align="center" valign="middle"><div align="left">
                  <table border="0" cellspacing="1" cellpadding="0" align="center" width="95%">
                    <tbody>
                      <tr bgcolor="#999999">
                        <td height="25" colspan="3"><span class="stylemidwhite">&nbsp;Please select your conference fee(s):</span><span class="stylesmallestred">(*)&nbsp;</span></td>
                      </tr>
                              
                      <tr>
                        <td bgcolor="#ffffff" width="50%">&nbsp;</td>
                        <td bgcolor="#ffffff" colspan="2">&nbsp;</td>
                      </tr>
                      <tr>
                        <td width="50%" bgcolor="#EDEAE9" height="25"><span class="stylesmaller">Early-bird registration</span>
                          <select name="Early_Bird" size="1" class="stylemid">
                                     
                                      <cfswitch expression="#comparedate#">
                                            <cfcase value="1">
                                                <cfoutput>
                                                      <option value="select from list">too late</option>
                                                </cfoutput>
                                          </cfcase>
                                          <cfdefaultcase>
                                                <cfswitch expression="#DevCountries.RecordCount#">
                                                      <cfcase value="1">
                                                            <cfoutput>
                                                                    <option value="select from list" selected>select from list</option>
                                                                    <option value="14">Full ( &euro;)</option>
                                                                    <option value="16">Post Doc ( &euro;)</option>
                                                                    <option value="18">Student ( &euro;)</option>
                                                                    <option value="13">Industry ( &euro;)</option>
                                                            </cfoutput>
                                                      </cfcase>
                                                      <cfcase value="0">
                                                            <cfoutput>
                                                                    <option value="select from list" selected>select from list</option>
                                                                    <option value="04">Full </option>
                                                                    <option value="07">Post Doc ( &euro;)</option>
                                                                    <option value="10">Student ( &euro;)</option>
                                                                    <option value="13">Industry (&euro;)</option>
                                                            </cfoutput>
                                                      </cfcase>
                                                  </cfswitch>
                                          </cfdefaultcase>
                                      </cfswitch>
                                      </select>
                                    </td>
                                    <td bgcolor="#EDEAE9" colspan="2">
                                    <cfswitch expression="#comparedate1#">
                                                <cfcase value="1">
                                                      <cfswitch expression="#DevCountries.RecordCount#">
                                                            <cfcase value="1">
                                                                  <cfoutput>
                                                                        &nbsp; <span class="stylesmaller">Late registration</span>                          
                                                                              <select name="NReg" size="1" class="stylemid">
                                                                                <option value="select from list" selected>select from list</option>
                                                                                <option value="15">Full ( &euro;)</option>
                                                                                <option value="17">Post Doc ( &euro;)</option>
                                                                                <option value="19">Student ( &euro;)</option>
                                                                                <option value="13">Industry (&euro;)</option>
                                                                               </select>
                                                                        </td>
                                                                  </cfoutput>
                                                            </cfcase>
                                                            <cfdefaultcase>
                                                                  <cfoutput>
                                                                        &nbsp; <span class="stylesmaller">Late registration</span>                          
                                                                              <select name="NReg" size="1" class="stylemid">
                                                                                <option value="select from list" selected>select from list</option>
                                                                                <option value="06">Full (500 &euro;)</option>
                                                                                <option value="09">Post Doc (400 &euro;)</option>
                                                                                <option value="12">Student (300 &euro;)</option>
                                                                                <option value="13">Industry (550&euro;)</option>
                                                                              </select>
                                                                        </td>
                                                                  </cfoutput>
                                                            </cfdefaultcase>
                                                      </cfswitch>
                                                </cfcase>
                                                <cfdefaultcase>
                                                      <cfswitch expression="#DevCountries.RecordCount#">
                                                            <cfcase value="1">
                                                                  <cfoutput>
                                                                        &nbsp; <span class="stylesmaller">Regular registration</span>                          
                                                                              <select name="NReg" size="1" class="stylemid">
                                                                                <option value="select from list" selected>select from list</option>
                                                                                <option value="15">Full ( &euro;)</option>
                                                                                <option value="17">Post Doc ( &euro;)</option>
                                                                                <option value="19">Student ( &euro;)</option>
                                                                                <option value="13">Industry (&euro;)</option>
                                                                                
                                                                              </select>
                                                                        </td>
                                                                  </cfoutput>
                                                            </cfcase>
                                                            <cfdefaultcase>
                                                                  <cfoutput>
                                                                        &nbsp; <span class="stylesmaller">Regular registration</span>                          
                                                                              <select name="NReg" size="1" class="stylemid">
                                                                                <option value="select from list" selected>select from list</option>
                                                                                <option value="05">Full ( &euro;)</option>
                                                                                <option value="08">Post Doc ( &euro;)</option>
                                                                                <option value="11">Student ( &euro;)</option>
                                                                                <option value="13">Industry (&euro;)</option>
                                                                              </select>
                                                                        </td>
                                                                  </cfoutput>
                                                            </cfdefaultcase>
                                                      </cfswitch>
                                                </cfdefaultcase>
                                          </cfswitch>
                       
                      </tr>
                      <tr bgcolor="#F7F5F4">
                        <td width="50%" class="stylesmaller" height="25"><p>Total # of Accompanying Person  <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(200 &euro;)&nbsp;&nbsp;&nbsp;
                                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                            <select name="AdultCompanion" size="1" class="stylemid">
                              <option value="0" selected>0</option>
                                            <option value="1">1</option>
                              <option value="2">2</option>
                              <option value="3">3</option>
                              <option value="4">4</option>
                              <option value="5">5</option>
                              <option value="6">6</option>
                              <option value="7">7</option>
                              <option value="8">8</option>
                              <option value="9">9</option>
                              <option value="10">10</option>
                            </select>
                        </p>
                          </td>
                        <td width="5%" valign="middle" bgcolor="#F7F5F4"></td>
                        <td width="45%" align="center"><span class="stylesmallestred">Note: Although Children under 16 are not charged as
                                    <br>
                        Accompanying Persons, You must count them in the total number of Accompanying Persons</span></td>
                      </tr>
                      <tr bgcolor="#EDEAE9">
                        <td class="stylesmaller" height="25">Children under 16&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                          <select name="ChildCompanion" size="1" class="stylemid">
                           <option value="0" selected>0</option>
                                            <option value="1">1</option>
                              <option value="2">2</option>
                              <option value="3">3</option>
                              <option value="4">4</option>
                              <option value="5">5</option>
                              <option value="6">6</option>
                              <option value="7">7</option>
                              <option value="8">8</option>
                              <option value="9">9</option>
                              <option value="10">10</option>
                          </select>
                                     </td>
                        <td colspan="2">&nbsp;</td>
                        </tr>
                      <tr >
                        <td class="stylesmaller" height="25">Names of accompanying persons:&nbsp;&nbsp;
                                    </td>
                        <td height="25" colspan="2" class="stylesmaller">
                                    <input name="AccName" type="text" class="stylemid"  value="name1 Fname1, name2 Fname2, ..., " size="40" maxlength="350" onSelect=".selstart = 1; .sellength = 10" >
                                    </td>
                      </tr>
                    </tbody>
                  </table>
                </div>
             
            </tr>
            <tr>
              <td colspan="2" align="center" valign="middle">
                    <br>
                    </td>
            </tr>
            <tr>
              <td colspan="2" valign="middle"><table border="0" cellspacing="1" cellpadding="0" align="center" width="95%">
                  <tbody>
                    <tr bgcolor="#999999">
                      <td height="25" colspan="3"><span class="stylemidwhite">&nbsp;Type of accomodation:</span><span class="stylesmallestred">(*)</span></td>
                    </tr>
                    <tr>
                      <td width="50%" height="23" bgcolor="#ffffff"><p class="stylesmallest2">(all prices are on a bed and Breakfast basis)</p></td>
                      <td bgcolor="#ffffff" colspan="2" width="50%"></td>
                    </tr>
                    <tr>
                      <td width="50%" height="25" bgcolor="#EDEAE9" class="stylesmaller">&nbsp;&nbsp;Hotel</td>
                      <td class="stylesmaller" bgcolor="#EDEAE9" colspan="2" width="50%">&nbsp;&nbsp;#Rooms</td>
                    </tr>
                    <tr bgcolor="#F7F5F4">
                      <td width="50%" align="center"><div class="stylesmaller">Hotel (5*)&nbsp;</div></td>
                      <td width="50%" colspan="2"><p class="stylesmaller">
                                <br>
                                &nbsp;
                            <select name="fiveSrooms" size="1" class="stylemid">
                           <option value="0" selected>0</option>
                                            <option value="1">1</option>
                              <option value="2">2</option>
                              <option value="3">3</option>
                              <option value="4">4</option>
                              <option value="5">5</option>
                          </select>
                      Single (90 &euro;/night)
                                <br>
                      <br>
                                &nbsp;
                            <select name="fiveDrooms" size="1" class="stylemid">
                           <option value="0" selected>0</option>
                                            <option value="1">1</option>
                              <option value="2">2</option>
                              <option value="3">3</option>
                              <option value="4">4</option>
                              <option value="5">5</option>
                          </select>
                      Double (119&euro;/night)</p>
                      <p></p>
                                </td>
                    </tr>
                    <tr bgcolor="#EDEAE9">
                      <td width="50%"><div align="center" class="stylesmaller"> Hotel (4*)</div></td>
                      <td width="50%" colspan="2"><p class="stylesmaller">
                                <br>
                                   &nbsp;
                      <select name="fourSrooms" size="1" class="stylemid">
                           <option value="0" selected>0</option>
                                            <option value="1">1</option>
                              <option value="2">2</option>
                              <option value="3">3</option>
                              <option value="4">4</option>
                              <option value="5">5</option>
                          </select>
                                &nbsp;Single (60 &euro;/night)
                                <br>
                      <br>
                                &nbsp;
                                <select name="fourDrooms" size="1" class="stylemid">
                           <option value="0" selected>0</option>
                                            <option value="1">1</option>
                              <option value="2">2</option>
                              <option value="3">3</option>
                              <option value="4">4</option>
                              <option value="5">5</option>
                          </select>                      
                                Double (85&euro;/ night)</p>
                      <p></p>
                                </td>
                    </tr>
                    <tr bgcolor="#F7F5F4">
                      <td width="50%"><div align="center" class="stylesmaller">Hotel (3*)</div></td>
                      <td width="50%" colspan="2"><p class="stylesmaller">
                                <br>
                                   &nbsp;
                      <select name="threeSrooms" size="1" class="stylemid">
                           <option value="0" selected>0</option>
                                            <option value="1">1</option>
                              <option value="2">2</option>
                              <option value="3">3</option>
                              <option value="4">4</option>
                              <option value="5">5</option>
                          </select>
                                &nbsp;Single (29&euro;/night) <br>
                      <br>
                      &nbsp;
                      <select name="threeDrooms" size="1" class="stylemid">
                           <option value="0" selected>0</option>
                                            <option value="1">1</option>
                              <option value="2">2</option>
                              <option value="3">3</option>
                              <option value="4">4</option>
                              <option value="5">5</option>
                          </select>
                      Double (44&euro;/ night)</p>
                      <p></p>
                                </td>
                    </tr>
                    <tr bgcolor="#EDEAE9">
                      <td bgcolor="#EDEAE9" class="stylesmaller" align="left" height="25">&nbsp;&nbsp;Arrival Date</td>
                      <td colspan="2" align="left" class="stylemid">
                                      <select name="ArrivalDate" size="1" class="stylemid">
                                            <option value="select from list" selected>Select-from-list</option>
                                            <option value="16-Feb-04">16 February</option>
                                            <option value="17-Feb-04">17 February</option>
                                            <option value="18-Feb-04">18 February</option>
                                            <option value="19-Feb-04">19 February</option>
                                            <option value="20-Feb-04">20 February</option>
                                            <option value="21-Feb-04">21 February</option>
                                            <option value="22-Feb-04">22 February</option>
                                            <option value="23-Feb-04">23 February</option>
                                            <option value="24-Feb-04">24 February</option>
                                      </select>
                      </td>
                    </tr>
                    <tr bgcolor="#F7F5F4">
                      <td align="left" bgcolor="#F7F5F4" class="stylesmaller" height="25">&nbsp;&nbsp;Departure Date </td>
                      <td colspan="2" align="left" class="stylemid">
                                      <select name="DepartureDate" size="1" class="stylemid">
                                            <option value="select from list" selected>Select-from-list</option>
                                            <option value="23-Feb-04">23 February</option>
                                            <option value="24-Feb-04">24 February</option>
                                            <option value="25-Feb-04">25 February</option>
                                            <option value="26-Feb-04">26 February</option>
                                            <option value="27-Feb-04">27 February</option>
                                            <option value="28-Feb-04">28 February</option>
                                            <option value="01-Mar-04">1 March</option>
                                            <option value="02-Mar-04">2 March</option>
                                            <option value="03-Mar-04">3 March</option>
                                            <option value="04-Mar-04">4 March</option>
                                            <option value="05-Mar-04">5 March</option>
                                      </select>
                      </td>
                    </tr>
                    <tr bgcolor="#EDEAE9">
                      <td bgcolor="#EDEAE9" class="stylesmaller" align="left" height="25">&nbsp;&nbsp;Vegetarian?</td>
                      <td colspan="2" align="left" bgcolor="#EDEAE9" class="stylemid">
                                      <select name="Vegetarian" class="stylemid">
                                            <option value="No" selected>No</option>
                                            <option value="Yes">Yes</option>
                                          </select>
                      </td>
                    </tr>
                  </tbody>
              </table></td>
            </tr>
             <tr>
              <td colspan="2" align="center" valign="middle">
                    <br>
                    </td>
            </tr>
                  <tr>
              <td colspan="2" align="center" valign="middle"><table border="0" cellspacing="1" cellpadding="0" align="center" width="95%" >
                <tbody>
                  <tr bgcolor="#999999">
                    <td height="25" colspan="3" bgcolor="#999999" align="left"><span class="stylemidwhite">&nbsp;Social Activities:</span><span class="stylesmallestred">&nbsp;</span></td>
                  </tr>
                  <tr>
                    <td colspan="2" bgcolor="#EDEAE9" align="center"><span class="stylesmaller">Banquet (25&euro;/person)</span><br>
                               <br> <span class="stylesmallestred">Please remember to count yourself!!</span></td>
                    <td width="61%" align="left" bgcolor="#EDEAE9"><p><span class="stylesmaller">
                              <br>
                              &nbsp;&nbsp;# of  attending adults:&nbsp;&nbsp;&nbsp;</span>                        
                                          <select name="BanquetAdult" class="stylemid">
                                                  <option value="0" selected>0</option>
                                                  <option value="1">1</option>
                                                  <option value="2">2</option>
                                                  <option value="3">3</option>
                                                  <option value="4">4</option>
                                                  <option value="5">5</option>
                                                  <option value="6">6</option>
                                                  <option value="7">7</option>
                                                  <option value="8">8</option>
                                                  <option value="9">9</option>
                                                  <option value="10">10</option>
                                          </select>
                            </p>
                      <p><span class="stylesmaller">&nbsp;&nbsp;# of attending children:</span>                        
                              <select name="BanquetChild" class="stylemid">
                                        <option value="0" selected>0</option>
                                                  <option value="1">1</option>
                                                  <option value="2">2</option>
                                                  <option value="3">3</option>
                                                  <option value="4">4</option>
                                                  <option value="5">5</option>
                                                  <option value="6">6</option>
                                                  <option value="7">7</option>
                                                  <option value="8">8</option>
                                                  <option value="9">9</option>
                                                  <option value="10">10</option>
                              </select>
                                    </p>
                      <p><span class="stylesmallestred">&nbsp;&nbsp;&nbsp;Note: Children under 16 are charged half price.</span></p>
                      <p></p></td>
                  </tr>
                  <tr bgcolor="#F7F5F4">
                    <td colspan="2" align="center" ><span class="stylesmaller">Post-Conference Tour
                                  <br>
                                  (350&euro;/person)<br><br>
                    </span>                               <span class="stylesmallestred">Please remember to count yourself!!</span>
                              </td>
                    <td align="left" bgcolor="#F7F5F4"><p><span class="stylesmaller">
                              <br>
                              &nbsp;&nbsp;# of attending adults:&nbsp;&nbsp;&nbsp;</span>
                                <select name="PostConfTourAdult" class="stylemid">
                                    <option value="0" selected>0</option>
                                                  <option value="1">1</option>
                                                  <option value="2">2</option>
                                                  <option value="3">3</option>
                                                  <option value="4">4</option>
                                                  <option value="5">5</option>
                                                  <option value="6">6</option>
                                                  <option value="7">7</option>
                                                  <option value="8">8</option>
                                                  <option value="9">9</option>
                                                  <option value="10">10</option>
                                </select>
                                    </p>
                      <p><span class="stylesmaller">&nbsp;&nbsp;# of attending children:</span>
                                <select name="PostConfTourChild" class="stylemid">
                                    <option value="0" selected>0</option>
                                                  <option value="1">1</option>
                                                  <option value="2">2</option>
                                                  <option value="3">3</option>
                                                  <option value="4">4</option>
                                                  <option value="5">5</option>
                                                  <option value="6">6</option>
                                                  <option value="7">7</option>
                                                  <option value="8">8</option>
                                                  <option value="9">9</option>
                                                  <option value="10">10</option>
                                </select>
                      </p>
                      <p>
                                      <span class="stylesmallestred">
                                          &nbsp;&nbsp;&nbsp;Note: Children under 16 are charged half price.
                                    </span>
                                </p>
                      <p align="center" class="stylesmallest">
                                      &nbsp;(the Post-Conference Tour begins February 26th <br>and ends February 28th)
                                </p>
                        <p align="center" class="stylesmallest">&nbsp;</p>
                    </td>
                  </tr>
                </tbody>
              </table>
               
                        </td>
            </tr>
            <tr>
              <td colspan="2" align="center" valign="middle">
                  <p align="justify" class="smallheading">CANCELLATION OF CONFERENCE PARTICIPATION:
                                <br>
                                <span class="stylesmallestjust">
                                <br>
                                </span>
                          </p>
                  <p align="justify" class="smallheading">Cancellation policy:
                                <span class="stylesmallestjust">.
                              </span>
                          </p>
                        </td>
            </tr>
            <tr>
              <td height="25" colspan="2" align="center" valign="middle"></td>
            </tr>
        </table>
      </tr>
      <tr>
        <td height="22" bgcolor="#BEABA7" class="stylemidwhite"></td>
      </tr>
      <tr>
        <td align="center" bgcolor="#BEABA7">
                  <input type="submit" name="Action" value="   Submit   " class="input">
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
              <input type="reset" name="Action" value="Reset Form" class="input"> <br />
                  <br />
            </td>
      </tr>
      <tr>
        <td height="49" align="center" bgcolor="#BEABA7"><p class="stylesmallest"></p>
          <p class="stylesmaller2"><a href="../Nano/loggedin.cfm">Return to  Menu </a><br />
                  <a href="<cfoutput>#CurrentPage#?MM_logout=1</cfoutput>">Log out</a></p>
          <p class="stylesmallest">&copy;&nbsp;NanoTech Insight &nbsp;2004</p>
          <p class="stylesmallest">&nbsp;</p></td>
      </tr>
      <tr>
        <td align="center" bgcolor="#BEABA7"></td>
      </tr>
    </table></tr>
</table>
</form>
</body>
</html>
0
What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 
LVL 35

Expert Comment

by:mrichmon
Comment Utility
But can you post the generated HTML code since this is a javascript error and the lines we get will be different and hard to see without your datasources.

Load teh page and choose View--> Page Source and then copy and paste that code here.

Thanks
0
 

Author Comment

by:MMsabry
Comment Utility

Here is the code copied from the view source, I have just noticed that there is a new code lines at the top of the page. so there are two doctype, two html start tags, these are not in my code, and i have no idea why are they there?
As for the the runtime error, it resides on line 357, chr 1, synthax error, I have checked that line, and there is an </tbody> there, i do not know again what is wrong with that code
also isn't the js supposed to be hidden from the browser, why can i see it in the view source code?
      

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Application</title>
</head>

<body>

</body>
</html>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta name="title" content="Pre-Registration">
<meta name="author" content="sabry">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta http-equiv="keywords" content="">
<meta http-equiv="description" content="">
<meta name="robots" content="all">
<meta name="revisit" content="7      days">
<title>Registration</title>



 
 










      


<script language="JavaScript">
<!--

      /*  First we set up some global variables to be shared among the functions. */
var message      /*  Variable used to build the alert message string. */
var fieldtofocus //  Stores the name of the data field to receive the focus.


/*  function that checks to see if the form has been filled out correctly

When the Submit button is clicked, the areFieldsReady()  function
is called before the form is sent for processing. Hence, validation
prior to the page being completed.  */

function areFieldsReady(form) {
      passed = true; /* This variable is set to "false" if the mail is not ready. */
      fieldtofocus = ""; /* Data field to receive the focus after the alert is closed. */
      
            /*  Set up the initial string of the alert message. The "\n"
            creates a new line for the text string.  */

      message ="The following Fields are missing or incorrect: \n \n";
            
            
            //var AccCheck = isAccCheck(Acname);
            //var Acname = document.Payment.AccName;
            var inputStr = form.AccName.value;
            
            
      
            //Checks the first required input field for an empty string.
       if (form.Early_Bird.value == "select from list" && form.NReg.value == "select from list" &&
            form.NReg.value =="select from list") {
                  // If the field is empty, add this to the message.
                message += "-  You Must Choose Your Registration Fee! \n \n";
                  
            passed = false;
                   /*Set this as the input field to have the focus after
                        the alert message. */                                  
            fieldtofocus = form.Early_Bird;
          }
      
       if (form.Early_Bird.value !== "select from list" && form.NReg.value !== "select from list" &&
              form.NReg.value !=="select from list")
       {
                  // If the field is empty, add this to the message.
                message += "-  You Should Choose Only One Registration Fee! \n \n";
                  
            passed = false;
                   /*Set this as the input field to have the focus after
                        the alert message. */                                  
            fieldtofocus = form.Early_Bird;
          }
            /* If a number for accopanying persons exist, check to see if their names where entered */
          if((form.AdultCompanion.value > 0 || form.ChildCompanion.value > 0) && (inputStr.search('name1') != -1 || form.AccName.value == "") ) {
                
                   message += "- You did not Type in the Name(s) of Accompanying Person(s)! \n \n";
                                     
                                    
                  passed = false;
                  if (fieldtofocus == ""){fieldtofocus = form.AccName;}
        }
        
      if (form.fiveSrooms.value == 0 && form.fiveDrooms.value == 0 && form.fourSrooms.value == 0 && form.fourDrooms.value == 0 && form.threeSrooms.value == 0 && form.threeDrooms.value == 0) {
                message += "-  Please Choose Your Accommodation \n \n";
            passed = false;
            if (fieldtofocus == "")  {fieldtofocus = form.fiveSrooms;}
        }
             
      if (form.ArrivalDate.value == "select from list") {
                  message += "-  You Must Indicate Your Arraival Date! \n \n";
                  
            passed = false;
            if (fieldtofocus == ""){fieldtofocus = form.ArrivalDate;}
          }

      if (form.ArrivalDate.value != "select from list" && form.DepartureDate.value == "select from list") {
                  message += "-  You Must Indicate Your Departure Date! \n \n";
                  
            passed = false;
            if (fieldtofocus == ""){fieldtofocus = form.DepartureDate;}
          }
      
      
      if (passed == false)  {
            fixFieldInfo(message, fieldtofocus);
      }
            /*  We need to return a "true" to the form's submit so that it will send
            the form. If a "false" is returned, nothing happens with the form
            submittal.  */

      return passed;
}
      
      /*   send out the message with the concatenated message strings and the field to receive
the cursor (focus) after the alert message is closed.*/

function fixFieldInfo(message, fieldtofocus){
      alert(message);
      fieldtofocus.focus();
}

//function AccNamefocous(){ document.Payment.AccName.selstart = 1; document.Payment.AccName.sellength = 5;}
// -->
</script>

<style type="text/css">
<!--
@import url(../Styles/sight.css);
body {
      background-color: #999999;
}
a:link {
      color: #993366;
      text-decoration: none;
}
a:visited {
      text-decoration: none;
}
a:hover {
      text-decoration: none;
      color: #6633CC;
}
a:active {
      text-decoration: none;
}
-->
</style>
</head>
<body>
<form name="Payment" method="post" action="verifyregandpay.cfm" onSubmit="return areFieldsReady(this)">
<table width="718" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><table width="718" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td></td>
      </tr>
      <tr>
        <td bgcolor="#BEABA7"><table width="616" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
            <tr>
              <td width="369" height="47" align="center" valign="middle" bgcolor="#BEABA7"><p align="left" class="stylemidwhite"><a href="mailto:registration@nanoinsight.net">Send a request for the pdf form</a></p></td>
              <td width="247" bgcolor="#BEABA7" align="right" class="stylesmaller">Last Updated
                  <!-- #BeginDate format:Am1 -->September 17, 2004<!-- #EndDate --></td>
            </tr>
            <tr>
              <td colspan="2" align="center" valign="middle"><p></p>
              <br>
              <br>
              <span class="style1bold">
                    <br>
             </span>
              <p><img name="nanologo" src="../Images/sepiatonelogoonetiny.png" width="105" height="86" alt=""></p>
              <p class="stylesmaller">NanoInsight Conference <span class="stylesmaller2">Registration Form </span></p>
              <p></p>
                    </td>
            </tr>
           
            <tr>
                                                      <td height="19" colspan="2" align="right"><p class="stylesmallest2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                                                      &nbsp;&nbsp;</p>
                                                      </td>
                                                </tr>
                                                <tr>
                                                  <td height="19" colspan="2" align="center" valign="middle">
                                                            <table width="95%" border="0" align="center" cellpadding="0" cellspacing="4">
                                                              <tbody>
                                                                  <tr bgcolor="#EDEAE9">
                                                                    <td width="155" height="25" align="left" valign="top" bgcolor="#EDEAE9">
                                                                          <div align="left"><span class="stylesmaller">
                                                                          <br />
                                                                          &nbsp;Participant's Details: </span>
                                                                          <span class="stylesmallestred"></span></div>
                                                                    </td>
                                                                    <td width="283" align="center" valign="middle">
                                                                          
                                                                              
                                                                                <div align="justify">
                                                                                  <br />
                                                                                  <div class="styleitalic">Dr.&nbsp;test2&nbsp;test2&nbsp; test2<br />
                                                          test2<br />
                                                          test2<br />
                                                          test2<br />
                                                          test2<br />
                                                          test2&nbsp;test2<br />
                                                          Bangladesh<br />
                                                           <br />
                                                                                    </div>
                                                                                </div>
                                                                              
                                                                        
                                                                    </td>
                                                                    <td width="128" align="center" valign="top"><br />
                                                                          <div align="left" >
                                                                              <span class="stylemiddarker">
                                                                                       16-Sep-04
                                                                          </span>
                                                                        </div>
                                                                    </td>
                                                                  </tr>
                                                              </tbody>
                                                        </table>
                                                  </td>
                                                </tr>
                                                <tr bgcolor="#FFFFFF">
                                                      <td height="19" colspan="2" align="center" valign="middle">
                                                  <br>
                                                  </td>
                                                </tr>
            <tr>
              <td colspan="2" align="center" valign="middle"><div align="left">
                  <table border="0" cellspacing="1" cellpadding="0" align="center" width="95%">
                    <tbody>
                      <tr bgcolor="#999999">
                        <td height="25" colspan="3"><span class="stylemidwhite">&nbsp;Please select your conference fee(s):</span><span class="stylesmallestred">(*)&nbsp;</span></td>
                      </tr>
                              
                      <tr>
                        <td bgcolor="#ffffff" width="50%">&nbsp;</td>
                        <td bgcolor="#ffffff" colspan="2">&nbsp;</td>
                      </tr>
                      <tr>
                        <td width="50%" bgcolor="#EDEAE9" height="25"><span class="stylesmaller">Early-bird registration</span>
                          <select name="Early_Bird" size="1" class="stylemid">
                                     
                                     
                                                
                                                            
                                                                    <option value="select from list" selected>select from list</option>
                                                                    <option value="14">Full ( &euro;)</option>
                                                                    <option value="16">Post Doc ( &euro;)</option>
                                                                    <option value="18">Student ( &euro;)</option>
                                                                    <option value="13">Industry (&euro;)</option>
                                                            
                                                      
                                          
                                      </select>
                                    </td>
                                    <td bgcolor="#EDEAE9" colspan="2">
                                    
                                                      
                                                                  
                                                                        &nbsp; <span class="stylesmaller">Regular registration</span>                          
                                                                              <select name="NReg" size="1" class="stylemid">
                                                                                <option value="select from list" selected>select from list</option>
                                                                                <option value="15">Full ( &euro;)</option>
                                                                                <option value="17">Post Doc ( &euro;)</option>
                                                                                <option value="19">Student ( &euro;)</option>
                                                                                <option value="13">Industry (&euro;)</option>
                                                                                
                                                                              </select>
                                                                        </td>
                                                                  
                                                            
                                                
                       
                      </tr>
                      <tr bgcolor="#F7F5F4">
                        <td width="50%" class="stylesmaller" height="25"><p>Total # of Accompanying Person  <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(200 &euro;)&nbsp;&nbsp;&nbsp;
                                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                            <select name="AdultCompanion" size="1" class="stylemid">
                              <option value="0" selected>0</option>
                                            <option value="1">1</option>
                              <option value="2">2</option>
                              <option value="3">3</option>
                              <option value="4">4</option>
                              <option value="5">5</option>
                              <option value="6">6</option>
                              <option value="7">7</option>
                              <option value="8">8</option>
                              <option value="9">9</option>
                              <option value="10">10</option>
                            </select>
                        </p>
                          </td>
                        <td width="5%" valign="middle" bgcolor="#F7F5F4"></td>
                        <td width="45%" align="center"><span class="stylesmallestred">Note: Although Children under 16 are not charged as
                                    <br>
                        Accompanying Persons, You must count them in the total number of Accompanying Persons</span></td>
                      </tr>
                      <tr bgcolor="#EDEAE9">
                        <td class="stylesmaller" height="25">Children under 16&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                          <select name="ChildCompanion" size="1" class="stylemid">
                           <option value="0" selected>0</option>
                                            <option value="1">1</option>
                              <option value="2">2</option>
                              <option value="3">3</option>
                              <option value="4">4</option>
                              <option value="5">5</option>
                              <option value="6">6</option>
                              <option value="7">7</option>
                              <option value="8">8</option>
                              <option value="9">9</option>
                              <option value="10">10</option>
                          </select>
                                     </td>
                        <td colspan="2">&nbsp;</td>
                        </tr>
                      <tr >
                        <td class="stylesmaller" height="25">Names of accompanying persons:&nbsp;&nbsp;
                                    </td>
                        <td height="25" colspan="2" class="stylesmaller">
                                    <input name="AccName" type="text" class="stylemid"  value="name1 Fname1, name2 Fname2, ..., " size="40" maxlength="350" onSelect=".selstart = 1; .sellength = 10" >
                                    </td>
                      </tr>
                    </tbody>
                  </table>
                </div>
             
            </tr>
            <tr>
              <td colspan="2" align="center" valign="middle">
                    <br>
                    </td>
            </tr>
            <tr>
              <td colspan="2" valign="middle"><table border="0" cellspacing="1" cellpadding="0" align="center" width="95%">
                  <tbody>
                    <tr bgcolor="#999999">
                      <td height="25" colspan="3"><span class="stylemidwhite">&nbsp;Type of accomodation:</span><span class="stylesmallestred">(*)</span></td>
                    </tr>
                    <tr>
                      <td width="50%" height="23" bgcolor="#ffffff"><p class="stylesmallest2">(all prices are on a bed and Breakfast basis)</p></td>
                      <td bgcolor="#ffffff" colspan="2" width="50%"></td>
                    </tr>
                    <tr>
                      <td width="50%" height="25" bgcolor="#EDEAE9" class="stylesmaller">&nbsp;&nbsp;Hotel</td>
                      <td class="stylesmaller" bgcolor="#EDEAE9" colspan="2" width="50%">&nbsp;&nbsp;#Rooms</td>
                    </tr>
                    <tr bgcolor="#F7F5F4">
                      <td width="50%" align="center"><div class="stylesmaller">Hotel (5*)&nbsp;</div></td>
                      <td width="50%" colspan="2"><p class="stylesmaller">
                                <br>
                                &nbsp;
                            <select name="fiveSrooms" size="1" class="stylemid">
                           <option value="0" selected>0</option>
                                            <option value="1">1</option>
                              <option value="2">2</option>
                              <option value="3">3</option>
                              <option value="4">4</option>
                              <option value="5">5</option>
                          </select>
                      Single (&euro;/night)
                                <br>
                      <br>
                                &nbsp;
                            <select name="fiveDrooms" size="1" class="stylemid">
                           <option value="0" selected>0</option>
                                            <option value="1">1</option>
                              <option value="2">2</option>
                              <option value="3">3</option>
                              <option value="4">4</option>
                              <option value="5">5</option>
                          </select>
                      Double (&euro;/night)</p>
                      <p></p>
                                </td>
                    </tr>
                    <tr bgcolor="#EDEAE9">
                      <td width="50%"><div align="center" class="stylesmaller"> Hotel (4*)</div></td>
                      <td width="50%" colspan="2"><p class="stylesmaller">
                                <br>
                                   &nbsp;
                      <select name="fourSrooms" size="1" class="stylemid">
                           <option value="0" selected>0</option>
                                            <option value="1">1</option>
                              <option value="2">2</option>
                              <option value="3">3</option>
                              <option value="4">4</option>
                              <option value="5">5</option>
                          </select>
                                &nbsp;Single ( &euro;/night)
                                <br>
                      <br>
                                &nbsp;
                                <select name="fourDrooms" size="1" class="stylemid">
                           <option value="0" selected>0</option>
                                            <option value="1">1</option>
                              <option value="2">2</option>
                              <option value="3">3</option>
                              <option value="4">4</option>
                              <option value="5">5</option>
                          </select>                      
                                Double (&euro;/ night)</p>
                      <p></p>
                                </td>
                    </tr>
                    <tr bgcolor="#F7F5F4">
                      <td width="50%"><div align="center" class="stylesmaller">Hotel (3*)</div></td>
                      <td width="50%" colspan="2"><p class="stylesmaller">
                                <br>
                                   &nbsp;
                      <select name="threeSrooms" size="1" class="stylemid">
                           <option value="0" selected>0</option>
                                            <option value="1">1</option>
                              <option value="2">2</option>
                              <option value="3">3</option>
                              <option value="4">4</option>
                              <option value="5">5</option>
                          </select>
                                &nbsp;Single (&euro;/night) <br>
                      <br>
                      &nbsp;
                      <select name="threeDrooms" size="1" class="stylemid">
                           <option value="0" selected>0</option>
                                            <option value="1">1</option>
                              <option value="2">2</option>
                              <option value="3">3</option>
                              <option value="4">4</option>
                              <option value="5">5</option>
                          </select>
                      Double (&euro;/ night)</p>
                      <p></p>
                                </td>
                    </tr>
                    <tr bgcolor="#EDEAE9">
                      <td bgcolor="#EDEAE9" class="stylesmaller" align="left" height="25">&nbsp;&nbsp;Arrival Date</td>
                      <td colspan="2" align="left" class="stylemid">
                                      <select name="ArrivalDate" size="1" class="stylemid">
                                            <option value="select from list" selected>Select-from-list</option>
                                            <option value="16-Feb-04">16 February</option>
                                            <option value="17-Feb-04">17 February</option>
                                            <option value="18-Feb-04">18 February</option>
                                            <option value="19-Feb-04">19 February</option>
                                            <option value="20-Feb-04">20 February</option>
                                            <option value="21-Feb-04">21 February</option>
                                            <option value="22-Feb-04">22 February</option>
                                            <option value="23-Feb-04">23 February</option>
                                            <option value="24-Feb-04">24 February</option>
                                      </select>
                      </td>
                    </tr>
                    <tr bgcolor="#F7F5F4">
                      <td align="left" bgcolor="#F7F5F4" class="stylesmaller" height="25">&nbsp;&nbsp;Departure Date </td>
                      <td colspan="2" align="left" class="stylemid">
                                      <select name="DepartureDate" size="1" class="stylemid">
                                            <option value="select from list" selected>Select-from-list</option>
                                            <option value="23-Feb-04">23 February</option>
                                            <option value="24-Feb-04">24 February</option>
                                            <option value="25-Feb-04">25 February</option>
                                            <option value="26-Feb-04">26 February</option>
                                            <option value="27-Feb-04">27 February</option>
                                            <option value="28-Feb-04">28 February</option>
                                            <option value="01-Mar-04">1 March</option>
                                            <option value="02-Mar-04">2 March</option>
                                            <option value="03-Mar-04">3 March</option>
                                            <option value="04-Mar-04">4 March</option>
                                            <option value="05-Mar-04">5 March</option>
                                      </select>
                      </td>
                    </tr>
                    <tr bgcolor="#EDEAE9">
                      <td bgcolor="#EDEAE9" class="stylesmaller" align="left" height="25">&nbsp;&nbsp;Vegetarian?</td>
                      <td colspan="2" align="left" bgcolor="#EDEAE9" class="stylemid">
                                      <select name="Vegetarian" class="stylemid">
                                            <option value="No" selected>No</option>
                                            <option value="Yes">Yes</option>
                                          </select>
                      </td>
                    </tr>
                  </tbody>
              </table></td>
            </tr>
             <tr>
              <td colspan="2" align="center" valign="middle">
                    <br>
                    </td>
            </tr>
                  <tr>
              <td colspan="2" align="center" valign="middle"><table border="0" cellspacing="1" cellpadding="0" align="center" width="95%" >
                <tbody>
                  <tr bgcolor="#999999">
                    <td height="25" colspan="3" bgcolor="#999999" align="left"><span class="stylemidwhite">&nbsp;Social Activities:</span><span class="stylesmallestred">&nbsp;</span></td>
                  </tr>
                  <tr>
                    <td colspan="2" bgcolor="#EDEAE9" align="center"><span class="stylesmaller">Banquet (&euro;/person)</span><br>
                               <br> <span class="stylesmallestred">Please remember to count yourself!!</span></td>
                    <td width="61%" align="left" bgcolor="#EDEAE9"><p><span class="stylesmaller">
                              <br>
                              &nbsp;&nbsp;# of  attending adults:&nbsp;&nbsp;&nbsp;</span>                        
                                          <select name="BanquetAdult" class="stylemid">
                                                  <option value="0" selected>0</option>
                                                  <option value="1">1</option>
                                                  <option value="2">2</option>
                                                  <option value="3">3</option>
                                                  <option value="4">4</option>
                                                  <option value="5">5</option>
                                                  <option value="6">6</option>
                                                  <option value="7">7</option>
                                                  <option value="8">8</option>
                                                  <option value="9">9</option>
                                                  <option value="10">10</option>
                                          </select>
                            </p>
                      <p><span class="stylesmaller">&nbsp;&nbsp;# of attending children:</span>                        
                              <select name="BanquetChild" class="stylemid">
                                        <option value="0" selected>0</option>
                                                  <option value="1">1</option>
                                                  <option value="2">2</option>
                                                  <option value="3">3</option>
                                                  <option value="4">4</option>
                                                  <option value="5">5</option>
                                                  <option value="6">6</option>
                                                  <option value="7">7</option>
                                                  <option value="8">8</option>
                                                  <option value="9">9</option>
                                                  <option value="10">10</option>
                              </select>
                                    </p>
                      <p><span class="stylesmallestred">&nbsp;&nbsp;&nbsp;Note: Children under 16 are charged half price.</span></p>
                      <p></p></td>
                  </tr>
                  <tr bgcolor="#F7F5F4">
                    <td colspan="2" align="center" ><span class="stylesmaller">Post-Conference Tour
                                  <br>
                                  (&euro;/person)<br><br>
                    </span>                               <span class="stylesmallestred">Please remember to count yourself!!</span>
                              </td>
                    <td align="left" bgcolor="#F7F5F4"><p><span class="stylesmaller">
                              <br>
                              &nbsp;&nbsp;# of attending adults:&nbsp;&nbsp;&nbsp;</span>
                                <select name="PostConfTourAdult" class="stylemid">
                                    <option value="0" selected>0</option>
                                                  <option value="1">1</option>
                                                  <option value="2">2</option>
                                                  <option value="3">3</option>
                                                  <option value="4">4</option>
                                                  <option value="5">5</option>
                                                  <option value="6">6</option>
                                                  <option value="7">7</option>
                                                  <option value="8">8</option>
                                                  <option value="9">9</option>
                                                  <option value="10">10</option>
                                </select>
                                    </p>
                      <p><span class="stylesmaller">&nbsp;&nbsp;# of attending children:</span>
                                <select name="PostConfTourChild" class="stylemid">
                                    <option value="0" selected>0</option>
                                                  <option value="1">1</option>
                                                  <option value="2">2</option>
                                                  <option value="3">3</option>
                                                  <option value="4">4</option>
                                                  <option value="5">5</option>
                                                  <option value="6">6</option>
                                                  <option value="7">7</option>
                                                  <option value="8">8</option>
                                                  <option value="9">9</option>
                                                  <option value="10">10</option>
                                </select>
                      </p>
                      <p>
                                      <span class="stylesmallestred">
                                          &nbsp;&nbsp;&nbsp;Note: Children under 16 are charged half price.
                                    </span>
                                </p>
                      <p align="center" class="stylesmallest">
                                      &nbsp;(the Post-Conference Tour begins February 26th <br>and ends February 28th)
                                </p>
                        <p align="center" class="stylesmallest">&nbsp;</p>
                    </td>
                  </tr>
                </tbody>
              </table>
               
                        </td>
            </tr>
            <tr>
              <td colspan="2" align="center" valign="middle">
                  <p align="justify" class="smallheading">CANCELLATION OF CONFERENCE PARTICIPATION:
                                <br>
                                <span class="stylesmallestjust">All cancellations should be made to the xxx  with the <a
                                                     href="/contactus.htm">
                                    online contact form</a> or by fax to the committee at: (+) or
                                    (+).
                                <br>
                                </span>
                          </p>
                  <p align="justify" class="smallheading">Cancellation policy:
                                <span class="stylesmallestjust">Full reimbursement minus charges:
                              </span>
                          </p>
                        </td>
            </tr>
            <tr>
              <td height="25" colspan="2" align="center" valign="middle"></td>
            </tr>
        </table>
      </tr>
      <tr>
        <td height="22" bgcolor="#BEABA7" class="stylemidwhite"></td>
      </tr>
      <tr>
        <td align="center" bgcolor="#BEABA7">
                  <input type="submit" name="Action" value="   Submit   " class="input">
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
              <input type="reset" name="Action" value="Reset Form" class="input"> <br />
                  <br />
            </td>
      </tr>
      <tr>
        <td height="49" align="center" bgcolor="#BEABA7"><p class="stylesmallest"></p>
          <p class="stylesmaller2"><a href="..Menu.cfm">Return to  Menu </a><br />
                  <a href="onlineregform.cfm?MM_logout=1">Log out</a></p>
          <p class="stylesmallest">&copy;&nbsp; &nbsp;2004</p>
          <p class="stylesmallest">&nbsp;</p></td>
      </tr>
      <tr>
        <td align="center" bgcolor="#BEABA7"></td>
      </tr>
    </table></tr>
</table>
</form>
</body>
</html>
0
 

Author Comment

by:MMsabry
Comment Utility
Tacobell, i have downloaded the debugger, but could not launch it!
0
 
LVL 35

Expert Comment

by:mrichmon
Comment Utility
No js is never hidden from the browser - the browser has to see it in order to run it.

The extra body and doctype etc tags at the top are most likely coming from something in your Application.cfm file.

Another problem I see is that in the javascript you are accessing the form as form.whatever

You need to access by the formname...

Give me a few minutes and I will have some modified code....
0
 
LVL 35

Expert Comment

by:mrichmon
Comment Utility
ALso I noteiced you set the focus to many fields...

This is probably not a good user interface design...

Just display the errors and either set the focus to the top - or don't set it at all...  taht is probably best since you are catching many errors.
0
 
LVL 35

Expert Comment

by:mrichmon
Comment Utility
Another thing I am noticing is you have things like this :

if (document.Payment.Early_Bird.value !== "select from list" &&
    document.Payment.NReg.value !== "select from list" &&
    document.Payment.NReg.value !=="select from list")

Where you are checking the same field twice int he same if statement.....
0
 
LVL 35

Expert Comment

by:mrichmon
Comment Utility
Nevermin about the fieldfocus - I see the test now...
0
 
LVL 35

Accepted Solution

by:
mrichmon earned 425 total points
Comment Utility
OKay I found the error

It is here :

<input name="AccName" type="text" class="stylemid"  value="name1 Fname1, name2 Fname2, ..., " size="40" maxlength="350" onSelect=".selstart = 1; .sellength = 10" >

I was able o fix the error by  simply changing the above line to :

<input name="AccName" type="text" class="stylemid"  value="name1 Fname1, name2 Fname2, ..., " size="40" maxlength="350" onSelect="document.Payment.selstart = 1; document.Payment.sellength = 10" >

Also I removed the double tests that  I mentioned above and change to directly access the form since "form" is a reserved word.  But you could fix that by using "myform" in your JS function.

So the above line willl fix the error, but here is the cleaned up Javascript code:

<script language="JavaScript">
<!--

var message;
var fieldtofocus;

function areFieldsReady()
{
 passed = true;
 fieldtofocus = "";

message ="The following Fields are missing or incorrect: \n \n";
         
var inputStr = document.Payment.AccName.value;
         

if (document.Payment.Early_Bird.value == "select from list" &&
    document.Payment.NReg.value == "select from list")
{
  message += "-  You Must Choose Your Registration Fee! \n \n";
               
  passed = false;
  fieldtofocus = document.Payment.Early_Bird;
}
     
if (document.Payment.Early_Bird.value !== "select from list" &&
    document.Payment.NReg.value !== "select from list")
{

  message += "-  You Should Choose Only One Registration Fee! \n \n";
  passed = false;
  fieldtofocus = document.Payment.Early_Bird;
}

if((document.Payment.AdultCompanion.value > 0 || document.Payment.ChildCompanion.value > 0) &&
   (inputStr.search('name1') != -1 || document.Payment.AccName.value == "") )
{
  message += "- You did not Type in the Name(s) of Accompanying Person(s)! \n \n";
  passed = false;
  if (fieldtofocus == "") {fieldtofocus = document.Payment.AccName;}
}
       
if (document.Payment.fiveSrooms.value == 0 &&
    document.Payment.fiveDrooms.value == 0 &&
    document.Payment.fourSrooms.value == 0 &&
    document.Payment.fourDrooms.value == 0 &&
    document.Payment.threeSrooms.value == 0 &&
    document.Payment.threeDrooms.value == 0)
{
  message += "-  Please Choose Your Accommodation \n \n";
  passed = false;
  if (fieldtofocus == "") {fieldtofocus = document.Payment.fiveSrooms;}
}
           
if (document.Payment.ArrivalDate.value == "select from list")
{
  message += "-  You Must Indicate Your Arraival Date! \n \n";
  passed = false;
  if (fieldtofocus == ""){fieldtofocus = document.Payment.ArrivalDate;}
}

if (document.Payment.ArrivalDate.value != "select from list" &&
    document.Payment.DepartureDate.value == "select from list")
{
  message += "-  You Must Indicate Your Departure Date! \n \n";
  passed = false;
  if (fieldtofocus == ""){fieldtofocus = document.Payment.DepartureDate;}
}
     
if (passed == false)
{
  fixFieldInfo(message, fieldtofocus);
}

   return passed;
}

function fixFieldInfo(message, fieldtofocus)
{
     alert(message);
     fieldtofocus.focus();
}

// -->
</script>
0
 
LVL 35

Expert Comment

by:mrichmon
Comment Utility
Also remember to check your application.cfm for why you are getting the double doctype and head etc...
0

Featured Post

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Join & Write a Comment

Most ColdFusion developers get confused between the CFSet, Duplicate, and Structcopy methods of copying a Structure, especially which one to use when. This Article will explain the differences in the approaches with examples; therefore, after readin…
When it comes to showing a 404 error page to your visitors, you do not want that generic page to show, and you especially do not want your hosting provider’s ad error page to show either. In this article, I will show you how to enable the custom 40…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now