joetadalan
Programmer
The last question - I asked about passing parameters worked great - now I am trying to do it again in a different page and it does not work - Here is some of the code -
<CFQUERY NAME="get_added_record" DATASOURCE="gift" DBTYPE="ODBC">
Select *
from gift
where userid = '#UserName#'
</CFQUERY>
<h1>Successfully Updated</h1>
Your information has been updated:
<div align="left">
<UL>
<FORM ACTION="wl_regdirect.cfm" METHOD="POST>
<CFOUTPUT>
<input type="hidden" name="UserName" Value="#UserName#">
<LI>User Name: <b>#UserName#</b></LI>
</CFOUTPUT>
<CFOUTPUT QUERY="get_added_record">
<LI>Prefix: <b>#Prefix#</b></LI>
<LI>First Name: <b>#FirstName#</b></LI>
<LI>Middle Initial: <b>#MiddleName#</b></LI>
<LI>Last Name: <b>#LastName#</b></LI>
<LI>Suffix: <b>#Suffix#</b></LI>
<LI>Street Number: <b>#StNumber#</b></LI>
<LI>Street Name: <b>#StName#</b></LI>
<LI>Street Type: <b>#StType#</b></LI>
<LI>City: <b>#City#</b></LI>
<LI>State: <b>#State#</b></LI>
<LI>Zip: <b>#PostalCode#</b></LI>
<LI>Home Phone: <b>#HomePhone#</b></LI>
<LI>Alt. Phone: <b>#WorkPhone#</b></LI>
<LI>E-Mail Address: <b>#EmailAddress#</b></LI>
</CFOUTPUT>
</UL>
<INPUT TYPE="SUBMIT" NAME="Operation" VALUE="REGISTRY">
<INPUT TYPE="SUBMIT" NAME="Operation" VALUE="EXIT REGISTRY SYSTEM">
</FORM>
</div>
<p>
When I click on Registry button above to go to wl_regdirect.cfm -
and hit this code
<BODY bgcolor="#ffffff" text="#000000" link="#003399" vlink="#992222" alink="#000000">
<CFOUTPUT>
<CFIF Operation is "Registry">
<CFLOCATION URL="wl_wishlistadd.cfm?UserName=#UserName#">
</CFIF>
<CFIF Operation is "EXIT REGISTRY SYSTEM">
<CFLOCATION URL="</CFIF>
</CFOUTPUT>
</BODY>
</HTML>
I receive error -
Error resolving parameter USERNAME
ColdFusion was unable to determine the value of the parameter. This problem is very likely due to the fact that either:
You have misspelled the parameter name, or
You have not specified a QUERY attribute for a CFOUTPUT, CFMAIL, or CFTABLE tag.
The error occurred while evaluating the expression:
"wl_wishlistadd.cfm?UserName=#UserName#"
Could someone point me in the correct direction and remember I am new to ColdFusion -
Thanks in advance
<CFQUERY NAME="get_added_record" DATASOURCE="gift" DBTYPE="ODBC">
Select *
from gift
where userid = '#UserName#'
</CFQUERY>
<h1>Successfully Updated</h1>
Your information has been updated:
<div align="left">
<UL>
<FORM ACTION="wl_regdirect.cfm" METHOD="POST>
<CFOUTPUT>
<input type="hidden" name="UserName" Value="#UserName#">
<LI>User Name: <b>#UserName#</b></LI>
</CFOUTPUT>
<CFOUTPUT QUERY="get_added_record">
<LI>Prefix: <b>#Prefix#</b></LI>
<LI>First Name: <b>#FirstName#</b></LI>
<LI>Middle Initial: <b>#MiddleName#</b></LI>
<LI>Last Name: <b>#LastName#</b></LI>
<LI>Suffix: <b>#Suffix#</b></LI>
<LI>Street Number: <b>#StNumber#</b></LI>
<LI>Street Name: <b>#StName#</b></LI>
<LI>Street Type: <b>#StType#</b></LI>
<LI>City: <b>#City#</b></LI>
<LI>State: <b>#State#</b></LI>
<LI>Zip: <b>#PostalCode#</b></LI>
<LI>Home Phone: <b>#HomePhone#</b></LI>
<LI>Alt. Phone: <b>#WorkPhone#</b></LI>
<LI>E-Mail Address: <b>#EmailAddress#</b></LI>
</CFOUTPUT>
</UL>
<INPUT TYPE="SUBMIT" NAME="Operation" VALUE="REGISTRY">
<INPUT TYPE="SUBMIT" NAME="Operation" VALUE="EXIT REGISTRY SYSTEM">
</FORM>
</div>
<p>
When I click on Registry button above to go to wl_regdirect.cfm -
and hit this code
<BODY bgcolor="#ffffff" text="#000000" link="#003399" vlink="#992222" alink="#000000">
<CFOUTPUT>
<CFIF Operation is "Registry">
<CFLOCATION URL="wl_wishlistadd.cfm?UserName=#UserName#">
</CFIF>
<CFIF Operation is "EXIT REGISTRY SYSTEM">
<CFLOCATION URL="</CFIF>
</CFOUTPUT>
</BODY>
</HTML>
I receive error -
Error resolving parameter USERNAME
ColdFusion was unable to determine the value of the parameter. This problem is very likely due to the fact that either:
You have misspelled the parameter name, or
You have not specified a QUERY attribute for a CFOUTPUT, CFMAIL, or CFTABLE tag.
The error occurred while evaluating the expression:
"wl_wishlistadd.cfm?UserName=#UserName#"
Could someone point me in the correct direction and remember I am new to ColdFusion -
Thanks in advance