?
Solved

Passing values through cfm to CFC's

Posted on 2005-04-22
6
Medium Priority
?
288 Views
Last Modified: 2013-12-24
I have a page with a combobox, containing the names of different railroads.  I want to take the value the user chooses and pass it into my cfm page as a component.  Each individual railroad is an extension of the base railroad component.  
The type of information I want to display is different, depending on the railroad selected.

<cfset railObj = createObject("component","NAME OF VALUE SELECTED FROM COMBOBOX") > 

How do I get the value of the selected item imported into the cfset statement
0
Comment
Question by:RogersGirl
  • 3
  • 2
6 Comments
 
LVL 35

Accepted Solution

by:
mrichmon earned 2000 total points
ID: 13846336
#Form.selectboxName#
0
 
LVL 21

Expert Comment

by:pinaldave
ID: 13847144
hi rogersgirl.
I think we may need more inforamtion about what you are trying to achive.

if you are looking for the value of the select item in the cfset... what you can do is that...

railObj.yourvalue

for that you will have to return your value in your function like

    <cffunction name="fgetmonth" returntype="query">

        <cfquery name="getmonth" datasource="#dsn#">
        your query
        </cfquery>
        <cfreturn qget_getmonth_month>
    </cffunction>
0
 

Author Comment

by:RogersGirl
ID: 13857844
I have a "railroad" component which extends into "bayline", "P&L", and "FEC".  These values are all in a combobox.  When the user selects a particular value, I want to have that value passed into my cfset as the component name I want to pull information from.
0
Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
LVL 21

Expert Comment

by:pinaldave
ID: 13858443
I am not clear that
if the answer from mrichmon fixed your problem, (very good) or you still need more help after that?
0
 

Author Comment

by:RogersGirl
ID: 13858974
mrichmon's answer did fix my problem.  I substituted his code into my cfset statement as the name of my component.
0
 
LVL 21

Expert Comment

by:pinaldave
ID: 13859041
good to hear that :) good day !
---Pinal
0

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

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

Most ColdFusion developers get confused between the CFSet, Duplicate, and Structcopy methods of copying a Structure, especially which one to use when. This Article will explain the differences in the approaches with examples; therefore, after readin…
When it comes to showing a 404 error page to your visitors, you do not want that generic page to show, and you especially do not want your hosting provider’s ad error page to show either. In this article, I will show you how to enable the custom 40…
This video shows how to quickly and easily deploy an email signature for all users in Office 365 and prevent it from being added to replies and forwards. (the resulting signature is applied on the server level in Exchange Online) The email signat…
As many of you are aware about Scanpst.exe utility which is owned by Microsoft itself to repair inaccessible or damaged PST files, but the question is do you really think Scanpst.exe is capable to repair all sorts of PST related corruption issues?
Suggested Courses

850 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