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!

assigning text input value to cfset

Status
Not open for further replies.

GCM06

Programmer
Mar 21, 2006
10
0
0
CA
Hi guys, how can I assign a text input value to cfset so that I can use that value in my query what i mean is
that so far I have the following.
<cfinput type="Text" name="RID" height="0" width="0" value="" bind= "{RequestList.selectedItem.RID}" />

<cfset RID = "RID">
<cfquery name="qAll" datasource="Report" dbtype="query">
select * from Report WHERE RID= '#RID#'
</cfquery>

I would like to assigned to cfset the value of what the cfinput is holding so that I can use that in my query.

Thanks in advance,
GC
 
Forget cfset, on your form action page:
Code:
<cfquery name="qAll" datasource="Report" dbtype="query">
    select * from Report WHERE RID= '#Form.RID#'
</cfquery>

Hope This Helps!

ECAR
ECAR Technologies

"My work is a game, a very serious game." - M.C. Escher
 
Thanks but it doesn't work,
this is actually happens on the same page. any other ideas?

Thanks in advance,
Greta
 
ColdFusion can not read the value of a form field until it has been submitted. So you either make the form action reload the page or go to another page.

DonOmite
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top