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!

Pass Values from Query when selected

Status
Not open for further replies.

TheVMan

IS-IT--Management
Feb 19, 2001
110
0
0
US
I am unfortunately at a loss being new to CF. I have this piece of code and a query that does work. The query runs, the table on the page is populated with the values I would expect to see. Now, based on what the user picks in their query, the link "Install" appears as a column and I want that to pass a value to another form. I've tried to post it to the form, but that didn't work. The value that I want to pass should get passed to another query. I just can't get it to. Can anyone offer any suggestions on how I could go about this? Thanks in advance.


<TABLE border=1 VALIGN=&quot;center&quot; cellpadding=1 cellspacing=1 style=&quot;HEIGHT: 64px; WIDTH: 520px&quot;>
<TR>
<TD><STRONG><FONT size=2>Universe </FONT></STRONG>
</TD>
<TD><STRONG><FONT size=2>Group Name </FONT></STRONG>
</TD>
<TD><FONT size=2><STRONG>Select to Install: </STRONG></FONT>
</TD>
</TR>

<CFOUTPUT QUERY=&quot;usercheck&quot;>
<TR VALIGN=&quot;center&quot;>

<TD VALIGN=&quot;center&quot;><FONT size=2>#UNV_NAME# </FONT>
</TD>
<TD VALIGN=&quot;center&quot;><FONT size=2>#USER_GROUP#
</FONT>
</TD>
<TD VALIGN=&quot;center&quot;><FONT size=2>
<a href=installit.cfm?UNV_ID=#UNV_ID#&quot;>Install</a> </FONT>
</TD>
</cfoutput>
 
What does installit.cfm look like? Is it a form with a hidden form field to store the passed #UNV_ID# through the hyperlink?

If so, try this.

<CFOUTPUT>
<INPUT TYPE=&quot;Hidden&quot; NAME=&quot;myformfield&quot; VALUE=&quot;#URL.UNV_ID#&quot;>
</CFOUTPUT>
Klotzki
 
Thanks for the response Klotzki. installit.cfm just starts with a query to return some values based on the UNV_ID from the first form. The second query returns a logical share location and executes a file from it based on that UNV_ID. Does the CFOUTPUT you describe go outside of the current CFOUTPUT Query= piece? Thanks again for your help.

V
 
The above code seems to be perfect. You should get the selected install value using #url.UNV_ID# in installit.cfm page
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top