all groups > coldfusion flash integration > july 2005 >
You're in the

coldfusion flash integration

group:

HIDDEN FIELDS NOT ACCESSIBLE???


HIDDEN FIELDS NOT ACCESSIBLE??? drforbin1970
7/26/2005 7:29:41 PM
coldfusion flash integration:
Here's the deal, I have a hidden field in a CFFORM format=flash:

<cfinput type="hidden" name="currrent_index" value="first">

When I try to access the field using inline ActionScript:

<cfinput name="aaa" type="checkbox" onclick="{alert(current_index.text)}">

The frickin field is BLANK! Yeah, I also tried
alert(_root.current_index.text), no dice.

Even worse, when I try to access using ActionScript in <cfsavecontent>, ex:
<cfsavecontent variable="#load#">
alert(current_index.text);
</cfsavecontent>
<cfinput name="aaa" type="checkbox" onclick="#load#">

I get an error message stating:
There is no property with the name 'current_index'.

BUT - when I change the field to "text" from "hidden", it works! So now I
have to make my "hidden" fields "text" fields and make their visible value
"false" to hide them. What gives???

I'm Using MX7.

Re: HIDDEN FIELDS NOT ACCESSIBLE??? The ScareCrow
7/26/2005 11:34:30 PM
To access hidden field you do this by formName.fieldName

You do not use .text

Thus, assuming the name of the form is "myForm"

<cfinput name="aaa" type="checkbox" onclick="{alert(myForm.current_index)}">

Ken
Re: HIDDEN FIELDS NOT ACCESSIBLE??? drforbin1970
7/27/2005 12:00:00 AM
Re: HIDDEN FIELDS NOT ACCESSIBLE??? The ScareCrow
7/27/2005 12:00:00 AM
I agree, and the text in the docs should not be just an Ohh and you do this to access a hidden field.

Re: HIDDEN FIELDS NOT ACCESSIBLE??? Mahababa
7/27/2005 7:16:59 PM
I had the same problem, and the solution was to use text input control with visibility set to no :
AddThis Social Bookmark Button