We help IT Professionals succeed at work.
Get Started

Assigning a dynamic application name in ColdFusion

varimereweb
varimereweb asked
on
774 Views
Last Modified: 2012-05-08
Hello.  I am trying to assign a dynamic application name by passing a URL variable from the root directory into an index.cfm file in another directory.  For example, I'm on page index.cfm in the root directory and I want to pass the URL variable roomID with a value of 10 to rooms/index.cfm.  The rooms/ directory has an Application.cfc file that needs to be named with this URL variables' value.  Like this:

<cfset this.name = "Room_" & url.roomID>

It seems to be naming the Application file correctly.  When I do a <cfdump> on the this- and application- scopes, the CFC gets named, but nothing on the pages work.  I am using a lot of jQuery / AJAX features such as the $.ajax() function to retrieve text and output that text into <div> tags, so I'm not sure if that's what is causing the conflict or not.  Thanks!
Comment
Watch Question
CERTIFIED EXPERT
Most Valuable Expert 2015
Commented:
This problem has been solved!
Unlock 2 Answers and 8 Comments.
See Answers
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE