• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Questions - dereferenced Function Call, form capitalization

Community Beginner ,
Nov 30, 2006 Nov 30, 2006

Copy link to clipboard

Copied

Hey two quick questions.

I'm wondering if I can call a com object function given that I have the string instead of the function name.

ie. Instead of
MyComObject.fucntionName(parameter);

something like this

stringVariable = functionName
MyComObject.stringVariable(parameter);

I know the syntax is incorrect but does anyone know how to do this in coldfusion?

QUESTION #2 :
I'm doing something like the following,
for (keyName in FORM) {
if (FORM[keyName] IS NOT "")
{
WriteOutput("FORM." & Keyname & " has the value: " & FORM[keyName] &"<br>");
}
}

However all the Keynames come out capitalized.
TOPICS
Advanced techniques

Views

230

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advisor ,
Nov 30, 2006 Nov 30, 2006

Copy link to clipboard

Copied

quote:

Originally posted by: BigRJJJ
Hey two quick questions. ... ...

However all the Keynames come out capitalized.


These are not really quick questions. Suggest you repost question 1 on another thread and provide details of the COM function and which CF version you are using.

As for CF uppercasing all the names of form fields, that's a "feature"! ;-)

If you want the original case, then you need to process the raw post for that.
See the attached code.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Dec 01, 2006 Dec 01, 2006

Copy link to clipboard

Copied

LATEST
sweet I'll try asking the question again with some more information.

I think it's not that difficult, in php it would look like this.

instead of this
$comObject->functionName(parameter);

this

$functionNameVariable = "functionName";
$comObject->$functionNameVariable(parameter);

I want to do something similar in CF but so far have been completely unable to see any way of doing this. Who knows, maybe CF doesn't support this. I am using cold fusion MX7.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation