[Last Call] Learn how to a build a cloud-first strategyRegister Now


Error Resolving Parameter - Cannot figure out the problem

Posted on 2011-10-21
Medium Priority
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='#form.email#'
  <cfoutput query="cardNumber">
  	<cfset registrant=#getLogin.FirstName1# + '' + #getLogin.Lastname1#>
    <cfset registrantEmail=#getLogin.email#>
    <cfset cardNumber=#getLogin.CardNumber#>
 		<cfmail from="HSO@realestateone.com"
        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
  • 3
  • 2
LVL 52

Expert Comment

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

Author Comment

ID: 37007497
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 52

Accepted Solution

_agx_ earned 2000 total points
ID: 37007592
       > <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

ID: 37007965
Thanks your reply helped a great deal
LVL 52

Expert Comment

ID: 37008152
Welcome :)

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

An alternative to the "For XML" way of pivoting and concatenating result sets into strings, and an easy introduction to "common table expressions" (CTEs). Being someone who is always looking for alternatives to "work your data", I came across this …
One of the most important things in an application is the query performance. This article intends to give you good tips to improve the performance of your queries.
This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.
Viewers will learn how the fundamental information of how to create a table.
Suggested Courses

830 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