Flash 表单绑定的冷融合问题
我有以下内容:
<cfquery name="getArt" datasource="cfartgallery">
select * from art where artid < 10
</cfquery>
<cfform name="myform2" width="620" height="750" timeout="100" preservedata="yes" wmode="transparent">
<cfoutput query="getArt">
<cfinput id="pickers#currentRow#" name="pickmany" type="checkbox" value="#artname#" >
<label for="pickers#currentRow#">#artname#</label>
<br/>
</cfoutput>
<cfinput type="text" name="pickmany_selected" bind="{pickmany}" size="50">
</cfform>
每当您选中一个框时,它就会添加到“pickmany_selected”字段中。
现在,我正在尝试使用 Flash 表单执行相同的操作。
<cfform name="myform" width="620" height="750" format="Flash" timeout="100" preservedata="yes" wmode="transparent">
<cfoutput query="getArt">
<cfinput id="pickers#currentRow#" name="pickmany" type="checkbox" value="#artname#" label="#artname#"><br/>
</cfoutput>
</cfform>
这打破了。仅当我输入 name="pickmany#currentRow#" 时它才有效:
<cfform name="myform" width="620" height="750" format="Flash" timeout="100" preservedata="yes" wmode="transparent">
<cfoutput query="getArt">
<cfinput id="pickers#currentRow#" name="pickmany#currentRow#" type="checkbox" value="#artname#" label="#artname#"><br/>
</cfoutput>
<cfinput type="text" name="pickmany_selected" bind="{pickmany1}" size="50">
</cfform>
我需要为 Flash 表单做什么才能正确绑定 pickmany_selected ?在最后一个示例中,我无法绑定到通用名称。讨厌这些flash形式。
i have the following :
<cfquery name="getArt" datasource="cfartgallery">
select * from art where artid < 10
</cfquery>
<cfform name="myform2" width="620" height="750" timeout="100" preservedata="yes" wmode="transparent">
<cfoutput query="getArt">
<cfinput id="pickers#currentRow#" name="pickmany" type="checkbox" value="#artname#" >
<label for="pickers#currentRow#">#artname#</label>
<br/>
</cfoutput>
<cfinput type="text" name="pickmany_selected" bind="{pickmany}" size="50">
</cfform>
whenever you check a box, it adds to the "pickmany_selected" field.
now, i am trying to do the same behaviour with a flash form.
<cfform name="myform" width="620" height="750" format="Flash" timeout="100" preservedata="yes" wmode="transparent">
<cfoutput query="getArt">
<cfinput id="pickers#currentRow#" name="pickmany" type="checkbox" value="#artname#" label="#artname#"><br/>
</cfoutput>
</cfform>
this breaks. it only works if i put name="pickmany#currentRow#":
<cfform name="myform" width="620" height="750" format="Flash" timeout="100" preservedata="yes" wmode="transparent">
<cfoutput query="getArt">
<cfinput id="pickers#currentRow#" name="pickmany#currentRow#" type="checkbox" value="#artname#" label="#artname#"><br/>
</cfoutput>
<cfinput type="text" name="pickmany_selected" bind="{pickmany1}" size="50">
</cfform>
what do i need to do for the flash form so that pickmany_selected binds correctly? in the last example, i cannot bind to a generic name. hate these flash forms.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
是的,Flash 表单要求所有字段名称都是唯一的。因此,我怀疑你的目标是不可能通过绑定实现的。但是,您可以推出自己的函数并将其称为 onClick。我的闪光技术很生疏。但沿着这些思路:
Yes, flash forms require all field names to be unique. Because of that, I suspect your goal is not possible with a bind. However, you could roll your own function and call it onClick. My flash skills are pretty rusty. But something along these lines: