Solved

Internet Explorer Error Expected ';'

Posted on 2003-12-01
7
253 Views
Last Modified: 2013-12-24
I am getting this message on one of my pages.  I am not sure how to correct?  Here is the code for the page.

<cfinclude template="../include/header.cfm">
<cfinclude template="../include/menubar.cfm">


<cfset can_edit = isdefined("form.revise")>
<cfset can_editcontact = isdefined("form.revisecontact")>
<cfset can_add = isdefined("form.add")>
<cfset can_addcontact = isdefined("form.addcontact")>
<cfset can_deletecontact = isdefined("form.deletecontact")>

<cfparam name="url.account" default="">

<cfif isdefined("form.account")>
 <cfset url.account = form.account>
</cfif>

<cfif Not Len(url.account)>
  <cfquery datasource="btadb" name="getacc">
  Select min(accountnbr) as account
  from account
  </cfquery>
  <cfset url.account = getacc.account>
</cfif>

<cfparam name="url.contactid" default="">

<cfif isdefined("form.contactid")>
  <cfset url.contactid = form.contactid>
</cfif>

<cfparam name="url.message" default="">

<cfquery datasource="btadb" name="getaccounts">
select accountnbr, accountname from account</cfquery>

<cfquery datasource="btadb" name="getaccountmaster">
SELECT     account.Accountnbr, account.Accountname, account.address, account.address2, account.city, account.state,
                      account.zip, account.zip2, account.areacode, account.prefix, account.number, account.faxareacode,
                                account.faxprefix, account.faxnumber, account.compease, account.performease
FROM         account
WHERE            account.accountnbr = #url.account#
</cfquery>

<cfquery datasource="btadb" name="getaccountcontact">
SELECT     account.Accountnbr, account.Accountname, account.address, account.address2, account.city, account.state,
                      account.zip, account.zip2, account.areacode, account.prefix, account.number, account.faxareacode,
                                account.faxprefix, account.faxnumber, account.compease, account.performease,
                      accountcontact.contactid, accountcontact.contactlastname, accountcontact.contactfirstname, accountcontact.contactareacode,
                      accountcontact.contactprefix, accountcontact.contactnumber, accountcontact.extension, accountcontact.department,
                                accountcontact.title, accountcontact.email
FROM         account INNER JOIN
                      accountcontact ON account.Accountnbr = accountcontact.accountnbr
WHERE            account.accountnbr = #url.account#
</cfquery>


<table width="75%" border="1" cellpadding="0" cellspacing="0" bordercolor="#669955" align="center">
 <tr><td>
  <form action="<cfif can_edit>account_action.cfm<cfelseif can_editcontact>account_action.cfm
                <cfelseif can_add>account_action.cfm<cfelseif can_addcontact>account_action.cfm
                        <cfelseif can_deletecontact>account_action.cfm<cfelse>index.cfm</cfif>" name="accountform" method="post" id="accountform">
   <table width="100%" border="0" cellpadding="0" cellspacing="0">
     <tr>
      <td colspan="7" bgcolor="#669955"><font color="#FFFFFF">Account Master</font></td>
     </tr>
     <tr>
      <td colspan="4">&nbsp;</td>
     </tr>
<cfinclude template="../include/changeaccount.cfm">
    </table>
      <tr>
       <td>
       <cfoutput query="getaccountmaster">
<cfif can_edit>
   <table width="100%"  border="1" bordercolor="##669955" cellpadding="0" cellspacing="0">
   <tr>
       <td valign="top">
         <table>
         <tr><td><strong>Address:</strong></td></tr>
         <tr><td><input type="text" value="#address#" name="address" style="width:280px"></td></tr>
         <tr><td><input type="text" value="#address2#" name="address2" style="width:280px"></td></tr>
         <tr><td><input type="text" value="#city#" name="city" style="width:100px">,
         <select name="state" style="width:60px">
<option value="AK" <cfif #state# eq 'AK'>selected</cfif>>AK</option>
<option value="AZ" <cfif #state# eq 'AZ'>selected</cfif>>AZ</option>
<option value="AR" <cfif #state# eq 'AR'>selected</cfif>>AR</option>
<option value="CA" <cfif #state# eq 'CA'>selected</cfif>>CA</option>
<option value="CO" <cfif #state# eq 'CO'>selected</cfif>>CO</option>
<option value="CT" <cfif #state# eq 'CT'>selected</cfif>>CT</option>
<option value="DE" <cfif #state# eq 'DE'>selected</cfif>>DE</option>
<option value="DC" <cfif #state# eq 'DC'>selected</cfif>>DC</option>
<option value="FL" <cfif #state# eq 'FL'>selected</cfif>>FL</option>
<option value="GA" <cfif #state# eq 'GA'>selected</cfif>>GA</option>
<option value="HI" <cfif #state# eq 'HI'>selected</cfif>>HI</option>
<option value="ID" <cfif #state# eq 'ID'>selected</cfif>>ID</option>
<option value="IL" <cfif #state# eq 'IL'>selected</cfif>>IL</option>
<option value="IN" <cfif #state# eq 'IN'>selected</cfif>>IN</option>
<option value="IA" <cfif #state# eq 'IA'>selected</cfif>>IA</option>
<option value="KS" <cfif #state# eq 'KS'>selected</cfif>>KS</option>
<option value="KY" <cfif #state# eq 'KY'>selected</cfif>>KY</option>
<option value="LA" <cfif #state# eq 'LA'>selected</cfif>>LA</option>
<option value="ME" <cfif #state# eq 'ME'>selected</cfif>>ME</option>
<option value="MD" <cfif #state# eq 'MD'>selected</cfif>>MD</option>
<option value="MA" <cfif #state# eq 'MA'>selected</cfif>>MA</option>
<option value="MI" <cfif #state# eq 'MI'>selected</cfif>>MI</option>
<option value="MN" <cfif #state# eq 'MN'>selected</cfif>>MN</option>
<option value="MS" <cfif #state# eq 'MS'>selected</cfif>>MS</option>
<option value="MO" <cfif #state# eq 'MO'>selected</cfif>>MO</option>
<option value="MT" <cfif #state# eq 'MT'>selected</cfif>>MT</option>
<option value="NE" <cfif #state# eq 'NE'>selected</cfif>>NE</option>
<option value="NV" <cfif #state# eq 'NV'>selected</cfif>>NV</option>
<option value="NH" <cfif #state# eq 'NH'>selected</cfif>>NH</option>
<option value="NJ" <cfif #state# eq 'NJ'>selected</cfif>>NJ</option>
<option value="NM" <cfif #state# eq 'NM'>selected</cfif>>NM</option>
<option value="NY" <cfif #state# eq 'NY'>selected</cfif>>NY</option>
<option value="NC" <cfif #state# eq 'NC'>selected</cfif>>NC</option>
<option value="ND" <cfif #state# eq 'ND'>selected</cfif>>ND</option>
<option value="OH" <cfif #state# eq 'OH'>selected</cfif>>OH</option>
<option value="OK" <cfif #state# eq 'OK'>selected</cfif>>OK</option>
<option value="OR" <cfif #state# eq 'OR'>selected</cfif>>OR</option>
<option value="PA" <cfif #state# eq 'PA'>selected</cfif>>PA</option>
<option value="RI" <cfif #state# eq 'RI'>selected</cfif>>RI</option>
<option value="SC" <cfif #state# eq 'SC'>selected</cfif>>SC</option>
<option value="SD" <cfif #state# eq 'SD'>selected</cfif>>SD</option>
<option value="TN" <cfif #state# eq 'TN'>selected</cfif>>TN</option>
<option value="TX" <cfif #state# eq 'TX'>selected</cfif>>TX</option>
<option value="UT" <cfif #state# eq 'UT'>selected</cfif>>UT</option>
<option value="VT" <cfif #state# eq 'VT'>selected</cfif>>VT</option>
<option value="VA" <cfif #state# eq 'VA'>selected</cfif>>VA</option>
<option value="WA" <cfif #state# eq 'WA'>selected</cfif>>WA</option>
<option value="WV" <cfif #state# eq 'WV'>selected</cfif>>WV</option>
<option value="WI" <cfif #state# eq 'WI'>selected</cfif>>WI</option>
<option value="WY" <cfif #state# eq 'WY'>selected</cfif>>WY</option>
</select>
          <input type="text" value="#zip#" name="zip" style="width:45px" size="5" maxlength="5"
               onClick="this.value='';" onKeyUp="if(this.value.length==5) this.form.zip2.focus()" onFocus="this.value='';">
            -<input type="text" value="#zip2#" name="zip2" style="width:45px"></td></tr>
         </table>
       </td>
       <td valign="top">
         <table>
         <tr><td width="125"><strong>Telephone:</strong></td></tr>
         <tr><td>
           <table><tr>
               <td><input type="text" value="#areacode#" name="areacode" style="width:30px" size="3" maxlength="3"
               onClick="this.value='';" onKeyUp="if(this.value.length==3) this.form.prefix.focus()" onFocus="this.value='';"></td>
               <td><input type="text" value="#prefix#" name="prefix" style="width:30px" size="3" maxlength="3"
               onClick="this.value='';" onKeyUp="if(this.value.length==3) this.form.number.focus()" onFocus="this.value='';"></td>
               <td><input type="text" value="#number#" name="number" style="width:50px" size="4" maxlength="4"
               onClick="this.value='';" onKeyUp="if(this.value.length==4) this.form.faxareacode.focus()" onFocus="this.value='';"></td>
             </tr></table>
         </td></tr>
         </table>
       </td>
       <td valign="top">
         <table>
         <tr><td width="125"><strong>Fax:</strong></td></tr>
         <tr><td>
           <table><tr>
               <td><input type="text" value="#faxareacode#" name="faxareacode" style="width:30px" size="3" maxlength="3"
               onClick="this.value='';" onKeyUp="if(this.value.length==3) this.form.faxprefix.focus()" onFocus="this.value='';"></td>
               <td><input type="text" value="#faxprefix#" name="faxprefix" style="width:30px" size="3" maxlength="3"
               onClick="this.value='';" onKeyUp="if(this.value.length==3) this.form.faxnumber.focus()" onFocus="this.value='';"></td>
               <td><input type="text" value="#faxnumber#" name="faxnumber" style="width:50px" size="4" maxlength="4"
               onClick="this.value='';" onKeyUp="if(this.value.length==4) this.form.canedit.focus()" onFocus="this.value='';"></td>
             </tr></table>
         </td></tr>
         </table>
       </td>
       <td valign="top">
         <table>
         <tr><td><strong>Support Systems:</strong></td></tr>
         <tr><td>Compease:  <select name="compease" style="width:50px">
                      <option value="yes" <cfif #compease# eq 'yes'>selected</cfif>>Yes</option>
                      <option value="no" <cfif #compease# eq 'no'>selected</cfif>>No</option>
                              </select></td></tr>
         <tr><td>Performease:  <select name="performease" style="width:50px">
                      <option value="yes" <cfif #compease# eq 'yes'>selected</cfif>>Yes</option>
                      <option value="no" <cfif #compease# eq 'no'>selected</cfif>>No</option>
                              </select></td></tr>
         </table>
       </td>
       </tr>
   </table>
<cfelse>
   <table width="100%"  border="1" bordercolor="##669955" cellpadding="0" cellspacing="0">
   <tr>
       <td valign="top">
         <table>
         <tr><td><strong>Address:</strong></td></tr>
         <tr><td>#address#</td></tr>
         <tr><td>#address2#</td></tr>
         <tr><td>#city#<cfif #city# neq "">, #state# #zip#<cfif #zip2# neq "">-#zip2#<cfelse></cfif><cfelse></cfif></td></tr>
         </table>
       </td>
       <td valign="top">
         <table>
         <tr><td width="125"><strong>Telephone:</strong></td></tr>
         <tr><td>
           <cfif #areacode# eq "">&nbsp;<cfelse>#areacode#-#prefix#-#number#</cfif>
         </td></tr>
         </table>
       </td>
       <td valign="top">
         <table>
         <tr><td width="125"><strong>Fax:</strong></td></tr>
         <tr><td>
           <cfif #faxareacode# eq "">&nbsp;<cfelse>#faxareacode#-#faxprefix#-#faxnumber#</cfif>
         </td></tr>
         </table>
       </td>
       <td valign="top">
         <table>
         <tr><td><strong>Support Systems:</strong></td></tr>
         <tr><td>Compease:  #compease#</td></tr>
         <tr><td>Performease:  #performease#</td></tr>
         </table>
       </td>
       </tr>
   </table>
   </cfif></cfoutput>
   </td></tr>
   <tr><td><table><tr>
     <td>&nbsp;</td>
       <cfif can_editcontact><cfelseif can_addcontact><cfelseif can_deletecontact><cfelse>
       <td><cfif can_edit><input type="submit" name="canedit" value="Save" style="width:80px">
         <input type="button" name="cancel" value="Cancel" onClick="history.go(-1);return true;" style="width:80px">
           <cfelse>
             <input type="submit" name="revise" value="Revise" style="width:80px"></cfif>
</td></cfif></tr></table>
  </td></tr>
  <tr><td><table width="100%" border="1" bordercolor="#669955" cellpadding="0" cellspacing="0">
  <tr>
      <td width="150"><strong>Contact:</strong></td>
      <td width="90"><strong>Telephone:</strong></td>
      <td width="50"><strong>Ext:</strong></td>
      <td width="150"><strong>Department:</strong></td>
      <td width="150"><strong>Title:</strong></td>
      <td width="150"><strong>Email:</strong></td>
  </tr>
<cfif can_editcontact>
  <cfoutput query="getaccountcontact">
  <cfif getaccountcontact.contactid eq #url.contactid#>
  <tr>
      <td>
        <table>
          <tr><td>First</td><td><input type="text" value="#trim(Contactfirstname)#" name="firstname" style="width:150px"></td></tr>
          <tr><td>Last</td><td><input type="text" value="#trim(contactlastname)#" name="lastname" style="width:150px"></td></tr>
        </table>
      </td>
      <td>
        <table><tr>
          <td><input type="text" value="#contactareacode#" name="contactareacode" size="3" maxlength="3"
            onClick="this.value='';" onKeyUp="if(this.value.length==3) this.form.contactprefix.focus()" onFocus="this.value='';">-</td>
          <td><input type="text" value="#contactprefix#" name="contactprefix" id="contactprefix" size="3" maxlength="3"
            onClick="this.value='';" onKeyUp="if(this.value.length==3) this.form.contactnumber.focus()" onFocus="this.value='';">-</td>
          <td><input type="text" value="#contactnumber#" name="contactnumber" id="contactnumber" size="4" maxlength="4"
            onClick="this.value='';" onKeyUp="if(this.value.length==4) this.form.extension.focus()" onFocus="this.value='';"></td>
        </tr></table></td>
      <td><input type="text" value="#extension#" name="extension" id="extension" style="width:50px"></td>
      <td><input type="text" value="#trim(Department)#" name="department" style="width:150px"></td>
      <td><input type="text" value="#trim(title)#" name="title" style="width:150px"></td>
      <td><input type="text" value="#email#" name="email" style="width:150px"></td>
  </tr>
  </cfif>
  </cfoutput>
<cfelseif can_addcontact>
  <tr>
      <td>
        <table>
          <tr><td>First</td><td><input type="text" name="firstname" style="width:150px"></td></tr>
            <tr><td>Last</td><td><input type="text" name="lastname" style="width:150px"></td></tr>
        </table>
      </td>
      <td>
        <table><tr>
          <td><input type="text" name="contactareacode" size="3" maxlength="3"
            onClick="this.value='';" onKeyUp="if(this.value.length==3) this.form.contactprefix.focus()">-</td>
          <td><input type="text" name="contactprefix" style="width:30px" size="3" maxlength="3"
            onClick="this.value='';" onKeyUp="if(this.value.length==3) this.form.contactnumber.focus()">-</td>
          <td><input type="text" name="contactnumber" style="width:50px" size="4" maxlength="4"
            onClick="this.value='';" onKeyUp="if(this.value.length==4) this.form.extension.focus()"></td>
      </tr></table></td>
      <td><input type="text" name="extension" style="width:50px"></td>
      <td><input type="text" name="department" style="width:150px"></td>
      <td><input type="text" name="title" style="width:150px"></td>
      <td><input type="text" name="email" style="width:150px"></td>
  </tr>
<cfelseif can_deletecontact>
  <cfoutput query="getaccountcontact">
  <cfif getaccountcontact.contactid eq #url.contactid#>
  <tr><td colspan="5" align="center"><font color="##FF0000">You will not be able to undo this action.</font></td>
  <tr>
      <td>#trim(Contactfirstname)#, #trim(contactlastname)#</td>
      <td>&nbsp;</td>
      <td>#extension#</td>
      <td>#trim(Department)#</td>
      <td>#trim(title)#</td>
      <td>#email#</td>
  </tr>
  </cfif>
  </cfoutput>
<cfelse>  
  <cfoutput query="getaccountcontact">
<tr onclick="document.location=''index.cfm?account=#url.account#&contactid=#contactid#;"
  <cfif getaccountcontact.contactid eq #url.contactid#>bgcolor="whitesmoke"</cfif>>
      <td><a href="index.cfm?account=#url.account#&contactid=#contactid#" class="basic">#trim(Contactlastname)#, #trim(contactfirstname)#</a></td>
      <td><cfif #contactareacode# eq "">&nbsp;<cfelse><table><tr><td>#contactareacode#-</td><td>#contactprefix#-</td><td>#contactnumber#</td></tr></table></cfif></td>
      <td><cfif #extension# eq "">&nbsp;<cfelse>#extension#</cfif></td>
      <td><cfif #department# eq "">&nbsp;<cfelse>#trim(Department)#</cfif></td>
      <td><cfif #title# eq "">&nbsp;<cfelse>#trim(title)#</cfif></td>
      <td><cfif #email# eq "">&nbsp;<cfelse>#email#</cfif></td>
  </tr>
  </cfoutput>
</cfif>
    </table>
   </td></tr>
   <tr><td><table>
   <cfif url.message eq 1>
   <tr><td>&nbsp;</td><td><font color="#FF0000">You did not enter a Contact Name</font>      </td>
   </tr>
      </cfif>
   <tr>
     <td>&nbsp;</td>
          <input type="hidden" value="<cfoutput>#url.contactid#</cfoutput>" name="contactid">
            <cfif can_add><cfelseif can_edit><cfelse>
       <td><cfif can_editcontact><input type="submit" name="caneditcontact" value="Save" style="width:80px">
         <input type="button" name="cancel" value="Cancel" onClick="history.go(-1);return true;" style="width:80px">
           <cfelseif can_addcontact><input type="submit" name="canaddcontact" value="Save" style="width:80px">
         <input type="button" name="cancel" value="Cancel" onClick="history.go(-1);return true;" style="width:80px">
           <cfelseif can_deletecontact><input type="submit" name="candeletecontact" value="Save" style="width:80px">
         <input type="button" name="cancel" value="Cancel" onClick="history.go(-1);return true;" style="width:80px">
           <cfelse>
             <input type="submit" name="addcontact" value="Add" style="width:80px">
             <cfif getaccountcontact.recordcount>
             <input type="submit" name="revisecontact" value="Revise" style="width:80px">
             </cfif>
             <input type="submit" name="deletecontact" value="Delete" style="width:80px">
             </cfif>
</td></cfif>
<cfif can_edit>
<cfelseif can_add>
<cfelseif can_addcontact>
<cfelseif can_editcontact>
<cfelseif can_deletecontact>
<cfelse>
<td>&nbsp;</td>
<cfif #session.accountnbr# eq 9000 or #session.accountnbr# eq 9999>
<td>
  <table>
    <tr><td><input type="button" name="addcontact" value="Return to Adding New Call" style="width:250px" onclick="window.location.assign('../support/addcall.cfm?account=<cfoutput>#url.account#</cfoutput>');"></td></tr>
  </table>
</cfif>
</cfif></tr></table>
<tr><td>
  <table width="100%" border="1" cellpadding="0" cellspacing="0" bordercolor="#669955" align="center">
 <tr style="height:38px"><td>&nbsp;
         <input type="button" name="compease" value="Compease Master" style="width:150px" onclick="window.location.assign('../compadmin/index.cfm?account=<cfoutput>#url.account#</cfoutput>');">
         <input type="button" name="perfease" value="Performease Master" style="width:150px" onclick="window.location.assign('../perfadmin/index.cfm?account=<cfoutput>#url.account#</cfoutput>');">
         <input type="button" name="account" value="Support Tracking" style="width:150px" onclick="window.location.assign('../support/details.cfm?account=<cfoutput>#url.account#</cfoutput>');">
  </td></tr></table>
</td></tr>
  </form>      
  </td></tr>
</table>
      

<cfif can_edit>
<script language="JavaScript">
 document.accountform.address.focus();
</script>
<cfelseif can_editcontact>
<script language="JavaScript">
 document.accountform.firstname.focus();
</script>
<cfelseif can_addcontact>
<script language="JavaScript">
 document.accountform.firstname.focus();
</script>
</cfif>
0
Comment
Question by:swartout
7 Comments
 
LVL 25

Expert Comment

by:James Rodgers
ID: 9852485
can you provide the source fromthe compiled page also
0
 
LVL 25

Accepted Solution

by:
James Rodgers earned 250 total points
ID: 9852512
this line

<tr onclick="document.location=''index.cfm?account=#url.account#&contactid=#contactid#;" <cfif getaccountcontact.contactid eq #url.contactid#>bgcolor="whitesmoke"</cfif>>

change it to this

<tr onclick="document.location='index.cfm?account=#url.account#&contactid=#contactid#';" <cfif getaccountcontact.contactid eq #url.contactid#>bgcolor="whitesmoke"</cfif>>
0
 
LVL 25

Expert Comment

by:James Rodgers
ID: 9852539
its around line 555 in the code the single quotes used to identify the url do not encompass the url so the interpreter is looking for a semi-colon after document.location='' before continuing with the rest of the line
0
Connect further...control easier

With the ATEN CE624, you can now enjoy a high-quality visual experience powered by HDBaseT technology and the convenience of a single Cat6 cable to transmit uncompressed video with zero latency and multi-streaming for dual-view applications where remote access is required.

 
LVL 17

Expert Comment

by:anandkp
ID: 9855742
it wld be a lot easier - if u cld let us know where exactly the error is !
0
 
LVL 11

Expert Comment

by:hart
ID: 9857086
Jester is correct remove the double quotes before the index.cfm
and make it single..

Regards
Hart
0
 

Author Comment

by:swartout
ID: 9858152
Thanks for the fix.  It works now.
0
 
LVL 25

Expert Comment

by:James Rodgers
ID: 9858171
glad i could help

thanks for the points
0

Featured Post

Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This is a guide to setting up a new WHM/cPanel Server to be used for web hosting accounts. It is intended for web hosting company administrators and dedicated server owners. For under $99 per month (considering normal rate of Big Data Cetnters like …
Lease-to-own eliminates the expenditure of hardware replacement and allows you to pay off the server over time. Usually, this is much cheaper than leasing servers. Think of lease-to-own as credit without interest.
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial

679 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