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

Get value of CFTREE without form submit

Guest
Nov 11, 2008 Nov 11, 2008

Copy link to clipboard

Copied

Hey everyone. I am building an upload interface with flash. There is a CFTREE that you can use to select where you want to upload the file. Since it's all done in flash you can't pass any additional form elements, and any extra info has to be passed via url. So I need to get the value of the CFTREE so I can pass it to my upload tag. Here you can see the page.

http://www.test.archmagazine.org/Administration/upload/index.cfm

Here is the code for my Form. I have one button I've been using for testing to try and show me the value of CFTREE via an alert, but that fails. A little further down you can see the page call with the URL variable that needs to be passed to the uploader page. Any help is appreciated.



TOPICS
Advanced techniques

Views

1.2K

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
Valorous Hero ,
Nov 11, 2008 Nov 11, 2008

Copy link to clipboard

Copied

asfusion.com usually has the answers. See the two comments starting here:
http://www.asfusion.com/blog/entry/cftree-populated-with-flash-remoting-and-xml#comment-1029

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
Guest
Nov 11, 2008 Nov 11, 2008

Copy link to clipboard

Copied

Thanks for the tip. The guy in that forum claimed the answer was

categories.selectedNode.getProperty('data').value;

how would I use that? That doesn't reference the name of the form, or the tree, so how can it possibly get the value of the selected node? Any ideas?

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
Valorous Hero ,
Nov 11, 2008 Nov 11, 2008

Copy link to clipboard

Copied

"categories" is the name of his tree. Just substitute the name of your tree:

dataFile.selectedNode.getProperty('data').value;

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
Guest
Nov 11, 2008 Nov 11, 2008

Copy link to clipboard

Copied

Haha i just figured that out, wow I feel dumb. Funny how when you are in unfamiliar territory (programming wise) all common sense seems to vanish, that should have been obvious. Now one final question, what would be the easiest way to append that to a URL variable?

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
Valorous Hero ,
Nov 11, 2008 Nov 11, 2008

Copy link to clipboard

Copied

I am not at all familiar with the cf_flashUpload tag. So unfortunately I cannot help you there.

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
Guest
Nov 11, 2008 Nov 11, 2008

Copy link to clipboard

Copied

What I need isn't specific to this upload tag. I just am being dumb and can't think of an way to include the javascript value returned by

var TreeVal = myTree.selectedNode.getProperty('data').value

and stick that on the end of

upload.cfm?uploadpath={TreeVal}

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
Valorous Hero ,
Nov 11, 2008 Nov 11, 2008

Copy link to clipboard

Copied

> <cf_flashUpload .. actionFile="upload.cfm?uploadpath={HERE} ..">
> What I need isn't specific to this upload tag.

Yes, I believe it is specific to that tag. The "actionFile" attribute is set on the server when the page loads. You obviously cannot change it on-the-fly.

That said, if you understand how cf_flashUpload works internally. You may be able to pass a dynamic value to it with actionscript. However, I do not have an understanding of that tag.

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
Guest
Nov 11, 2008 Nov 11, 2008

Copy link to clipboard

Copied

Damnit.
All i want to do is include the value of the stupid tree when that tag is called. I don't understand why is has to be so difficult. I don't have any understanding of actionscript. I'm just a cold fusion programmer :P. I can get the value i need in javascript, I just need to modify that link in the actionfile tag to have the path selected in the tree.

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
Valorous Hero ,
Nov 11, 2008 Nov 11, 2008

Copy link to clipboard

Copied

LATEST
Well now is your chance to learn about actionscript, the same way everyone else did. By reading the documentation (and asfusion.com articles - very helpful stuff 😉

Since it is not a built-in ColdFusion tag, you are going to have to look at the internal code and see where it is using the actionFile attribute. Then determine how you can modify it with actionscript.

My guess would be you could bind the selected value to a hidden field. Then using the hidden field value when constructing the URL string. But I have not used the tag, so that is just a guess.

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