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

Using CF to create a JS function

New Here ,
Apr 18, 2006 Apr 18, 2006

Copy link to clipboard

Copied

I am using ColdFusion to create a JS array. The array is populated just fine but it is not working, nor do I get any errors. I have attached the original code and the result. Any assistance would be appreciated.

Thanks,

Bruce
TOPICS
Advanced techniques

Views

192

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
LEGEND ,
Apr 18, 2006 Apr 18, 2006

Copy link to clipboard

Copied

If you are using version 7, you can create your array in cold fusion before you start your js, and use the toscript function to convert the cold fusion array to a js array. It's a lot simpler than what you are attempting.

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
Contributor ,
Apr 18, 2006 Apr 18, 2006

Copy link to clipboard

Copied

LATEST
Bruce, I don't see how your loop construction advances the record pointer. I tried it and the array was populated with the first record, x times.

I changed it to a CFOUTPUT with a query referent, and incremented a counter variable to set the array element number.

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