Ask a Question related to Coldfusion Flash Integration, Design and Development.
-
cf_dev2 #1
cfformitem type="script": How to set hidden field'svalue?
I have a simple test form that contains a cftree and a few input/hidden fields.
Whenever a tree node is selected, I want to change the values of input/hidden
fields to whatever node was selected. Pretty simple, but I can't figure out
how to change the values of the hidden fields.
Load the form, select "ItemA" and click submit. The values of the hidden form
fields don't change. They're always "not set". What is the correct syntax for
changing a hidden field's value?
<cfdump var="#form#">
<cfform name="myForm" format="flash">
<cfformitem type="script">
function test(theValue:String):Void {
var valueString:String = theValue.toString();
title.text = "title = "+ valueString;
description.text = "description = "+ valueString;
myForm.theType.text = "theType = "+ valueString;
myForm.theID.text = "theID = "+ valueString;
}
</cfformitem>
<cftree name="itemTree"
onchange="test(itemTree.selectedNode.getProperty(' data').value)">
<cftreeitem display="ItemA" value="ItemA" parent="" expand="no" />
<cftreeitem display="ItemB" value="ItemB" parent="ItemA" expand="no" />
<cftreeitem display="ItemC" value="ItemC" parent="ItemB" expand="no" />
<cftreeitem display="ItemD" value="ItemD" parent="ItemB" expand="no" />
</cftree>
<cfformgroup type="panel" label="Add / Edit">
<cfformgroup type="horizontal">
<cfformitem type="text" style="fontWeight:bold;"
width="80">Title:</cfformitem>
<cfinput name="title" type="text" width="200" value=" " />
</cfformgroup>
<cfformgroup type="horizontal">
<cfformitem type="text" style="fontWeight:bold;"
width="80">Description:</cfformitem>
<cftextarea name="description" type="text" height="100" />
</cfformgroup>
<cfinput type="hidden" name="theType" value="not set" />
<cfinput type="hidden" name="theID" value="not set" />
<cfinput type="submit" name="submitButton" value="Submit">
</cfformgroup>
</cfform>
cf_dev2 Guest
-
cfformitem type="html"
I am having sound trouble using the above tag to display images... Using fusebox 3, getting a prod. description from a database, which includes a... -
<cfformitem type ="script">???
Hi all I am having difficulties with an app that i downloaded from asfusion.com. The apps url is http://www.asfusion.com/apps/realestate/... -
Using CFSAVECONTENT with CFFORMITEM type="HTML"
I am trying to create a preview area made up of a mix of HTML and cfform variables in a binding string. This is similar to the ASFusion article in... -
CFINPUT type="radio" w/ "value" requires "label"
On a Flash form, when you specify type='radio' and value='whatever', the value of the 'value' attribute will be displayed as a label if no 'label'... -
#25366 [NEW]: form buttons of type "image" dont send "submit" $_POST variable in IE
From: jordanolsommer at imap dot cc Operating system: Windows XP PHP version: 4.3.2 PHP Bug Type: Variables related Bug... -
The ScareCrow #2
Re: cfformitem type="script": How to set hidden field'svalue?
The correct syntax is
myForm.theID = "theID = "+ valueString;
Ken
The ScareCrow Guest
-
cf_dev2 #3
Re: cfformitem type="script": How to set hidden field'svalue?
That was it. Thanks! Weird that there's a different syntax for hidden fields.
Do you know if there any online references or documentation for scripting?
I've been using snippets from tutorials and trying to figure out the syntax
from flex documentation.
cf_dev2 Guest
-
The ScareCrow #4
Re: cfformitem type="script": How to set hidden field'svalue?
You will need to use a combination of resources.
1. CF Documentation
[url]http://livedocs.adobe.com/coldfusion/7/htmldocs/wwhelp/wwhimpl/common/html/wwhel[/url]
p.htm?context=ColdFusion_Documentation&file=part_d ev.htm
2. Flash Documentation
3. Flex Documentation
Ken
The ScareCrow Guest
-
cf_dev2 #5
Re: cfformitem type="script": How to set hidden field'svalue?
Thanks Ken, that helped. With the updated CF help files and Flash
documentation its starting to make a little more sense.
On a humorous note, I have to say it feels a little like the instructions are
written in Swahili and I'm using an English-to-Russian dictionary and then a
Russian-to-Swahili dictionary to read them ;-)
cf_dev2 Guest
-
The ScareCrow #6
Re: cfformitem type="script": How to set hidden field'svalue?
So that's my problem, someone stole my Russian-to-Swahili dictionary
Ken
The ScareCrow Guest
-
cf_dev2 #7
Re: cfformitem type="script": How to set hidden field'svalue?
Now that's funny ;-) I did hear a rumor that the next version is in Chinese. So you might skip the replacement and purchase a Russian-to-Chinese dictionary instead.
cf_dev2 Guest



Reply With Quote

