Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

More on Passing Parameters

Status
Not open for further replies.

joetadalan

Programmer
Oct 3, 2002
5
0
0
US
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=&quot;get_added_record&quot; DATASOURCE=&quot;gift&quot; DBTYPE=&quot;ODBC&quot;>
Select *
from gift
where userid = '#UserName#'
</CFQUERY>

<h1>Successfully Updated</h1>
Your information has been updated:
<div align=&quot;left&quot;>
<UL>
<FORM ACTION=&quot;wl_regdirect.cfm&quot; METHOD=&quot;POST>
<CFOUTPUT>
<input type=&quot;hidden&quot; name=&quot;UserName&quot; Value=&quot;#UserName#&quot;>
<LI>User Name: <b>#UserName#</b></LI>
</CFOUTPUT>
<CFOUTPUT QUERY=&quot;get_added_record&quot;>
<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=&quot;SUBMIT&quot; NAME=&quot;Operation&quot; VALUE=&quot;REGISTRY&quot;> &nbsp;
<INPUT TYPE=&quot;SUBMIT&quot; NAME=&quot;Operation&quot; VALUE=&quot;EXIT REGISTRY SYSTEM&quot;>
</FORM>
</div>
<p>

When I click on Registry button above to go to wl_regdirect.cfm -

and hit this code

<BODY bgcolor=&quot;#ffffff&quot; text=&quot;#000000&quot; link=&quot;#003399&quot; vlink=&quot;#992222&quot; alink=&quot;#000000&quot;>
<CFOUTPUT>
<CFIF Operation is &quot;Registry&quot;>
<CFLOCATION URL=&quot;wl_wishlistadd.cfm?UserName=#UserName#&quot;>
</CFIF>
<CFIF Operation is &quot;EXIT REGISTRY SYSTEM&quot;>
<CFLOCATION URL=&quot;</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:


&quot;wl_wishlistadd.cfm?UserName=#UserName#&quot;

Could someone point me in the correct direction and remember I am new to ColdFusion -

Thanks in advance
 
It should be <CFLOCATION URL=&quot;wl_wishlistadd.cfm?UserName=#form.UserName#>, I believe.

Hope it helps,
-Carl
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top