Error Resolving Parameter - Cannot figure out the problem

Posted on 2011-10-21
Last Modified: 2012-05-12
  I am working on a registration form and upon testing I am receiving the following error:
Error Diagnostic Information
An error occurred while evaluating the expression:
Error near line 61, column 24.

I cannot seem to figure out why it's not working, I checked the spelling so I think it must be something simple that I am just missing.  This is what I have on the registration page and below is the code for the action page:
<form action="registration_action_new.cfm" method="post" name="registration_form"><!--- _action --->            
      <!---First User's name here--->
      <tr><td align="left">First Name</td>
        <td align="right"><input type="text" name="FirstName1" size="25" ></td>
        <td>Last Name</td>
        <td align="right"><input type="text" name="LastName1" size="25" ></td></tr>
        <!---Second User's name here--->
        <tr><td><font><small>(additional authorized user)</small></font></td></tr>
        <tr><td align="left"> First Name</td>
        <td align="right"><input type="text" name="FirstName2" size="25" ></td>
        <td>Last Name</td>
        <td align="right"><input type="text" name="LastName2" size="25" ></td>
        <tr><td colspan="10"><hr /></td></tr>
        <!---Contact Information--->
        <tr><td><b>Contact Information</b></td></tr>
      <tr><td align="left">Address:</td>
        <td align="right"><input type="text" name="Address" size="25" ></td>
        <tr><td align="left">City:</td>
        <td align="right"><input type="text" name="City" size="25" ></td>
      <td align="left">State:</td>
        <td align="right"><input type="text" name="State" size="25" ></td>
        <td align="left">Zip Code:</td>
        <td ><input type="text" name="Zip" size="5" ></td>
      <tr><td align="left"> Email Address</td>
        <td align="right"><input type="email" name="Email" required="true" validate="email" message="Pleae provide a valid email address" size="25" ></td>
        <td align="left">Phone</td>
        <td align="right"><input type="text" value="" name="PhoneNumber" size="25" ></td>

       <td> Transaction Type<form method="post" action="registration_action_new.cfm">
       <select size="1" name="transaction">
       <option value="purchase">Purchase</option>
       <option value="sell">Sell</option>
                <!---Agent Selection --->
     <cfquery name="getAgents" datasource="teamportals">
                 Select LastName + ' ' + FirstName + ' ' + 'office ' + ' ' + Company AS Agent, Paynum, AssociateCell
              From tblUser
            Where Inactive = '0' AND Role ='agent'
            Order By LastName
     Select Agent:&nbsp;&nbsp;  <cfform name="agentlookup" action="registration_action_new.cfm">
           <cfselect name="agentname" query="getAgents" value="Agent" display="Agent" required="yes" multiple="no" size="1" >
      <br /><br />
        <input type="submit" name="add_btn" value = "Submit">&nbsp;&nbsp;&nbsp;
        <input type="Reset" name="cancel_btn" value = "  Clear  ">
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

	<title>Home Savings One Registration/Login</title>

loop over the past 7 days to get the week_ending value--->

<cfloop index="intOffset" from="0" to="7" step="1">
	<!--- Get the WEEKDAY that we want to show. --->
	<cfset dtDay = DateAdd( "d", -intOffset, Now() ) >
	Output the full date so we can see BOTH the day
	of the week and the day-date.
	<cfset whichDay = '#DateFormat(dtDay, 'ddd')#'>
	<!--- grab the Sunday in the last seven days --->
	<cfif #DateFormat(dtDay, 'ddd')# IS 'Sun'>
		<cfset Myday = #DateFormat(dtDay, 'mm/dd/yy')#>

<!--- 	<cfoutput>#MyDay#</cfoutput> --->

<body leftmargin="0" marginheight="0" marginwidth="0" bottommargin="0" rightmargin="0" topmargin="0"
alink="993399" link="993399" vlink="black">
<table width="100%" border="0" cellpadding="0" cellspacing="0">

	<cfset date_added = CreateODBCDate(#dateformat(now(), 'mm/dd/yyyy')#)>
	<td valign="top">
    <img src="images/hs1_homeheader_new3.jpg" width="977" height="127" alt="header">

<table align="center">
<tr><td align="center" colspan="6" ><h3>Home Savings One Registration</h3></td></tr>
<tr><td align="center" colspan="6" class="td2a"><cfoutput> #DateFormat(date_added, 'mm/dd/yy')#</cfoutput></td></tr>
<cfif parameterExists(form.add_btn)>


		<cfquery name="addUser" datasource="HSO">
			Insert Into	savings_card
            Values		('#form.FirstName1#','#form.LastName1#''#form.FirstName2#',
<!--Automated Email-->
 		<cfquery name="getLogin" datasource="HSO">
        	Select	CardNumber,FirstName1,LastName1,Email
            FROM	savings_card
            WHERE	Email=''
  <cfoutput query="cardNumber">
  	<cfset registrant=#getLogin.FirstName1# + '' + #getLogin.Lastname1#>
    <cfset cardNumber=#getLogin.CardNumber#>
 		<cfmail from=""
        subject="Home Savings Registration Confirmation"
        Thank you for registering for your permanent Home Savings One card. You can go into the site to review the directory now (hyperlinked) or come back anytime and login using "#registrant#" with the password "#cardNumber#". Please look for your card to come in the mail within 2 weeks.

Home Savings Support Staff

        <br /><br />
        <cfoutput>Thank you for registering for your permanent Home Savings One card. You can go into the site to review the directory now (hyperlinked) or come back anytime and login using "#registrant#" with the password "#cardNumber#". This information will also be emailed to you. Please look for your card to come in the mail within 2 weeks.

Home Savings Support Staff



Open in new window

Question by:jdines
    LVL 51

    Expert Comment

    What's the full error message and when does it occur? When you submit the form?

    Author Comment

    Error occurred while processing request
    An error occurred while evaluating the expression:
    Error near line 61 column 24

    It occurs when I submit the custreg.cfm form
    LVL 51

    Accepted Solution

           > <cfif parameterExists(form.add_btn)>

    It's because you've got 2 forms with different fields, but the same button name.  So you end up running the same code for both forms.  

    Give the buttons different names, so you can perform different actions based on which form was submitted.   Also, parameterExists is deprecated. Use structKeyExists or IsDefined instead.

    <cfif structKeyExists(FORM, "nameOfButtonFromFirstForm")>
             process 1st form
    <cfelseif structKeyExists(FORM, "nameOfButtonFromSecondForm")>
             process 2nd form

    Author Closing Comment

    Thanks your reply helped a great deal
    LVL 51

    Expert Comment

    Welcome :)

    Featured Post

    Enabling OSINT in Activity Based Intelligence

    Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

    Join & Write a Comment

    Introduction SQL Server Integration Services can read XML files, that’s known by every BI developer.  (If you didn’t, don’t worry, I’m aiming this article at newcomers as well.) But how far can you go?  When does the XML Source component become …
    Everyone has problem when going to load data into Data warehouse (EDW). They all need to confirm that data quality is good but they don't no how to proceed. Microsoft has provided new task within SSIS 2008 called "Data Profiler Task". It solve th…
    Via a live example, show how to setup several different housekeeping processes for a SQL Server.
    Viewers will learn how to use the SELECT statement in SQL and will be exposed to the many uses the SELECT statement has.

    729 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

    17 Experts available now in Live!

    Get 1:1 Help Now