<SELECT multiple="multiple" ID="icd9List" name="icd9List" size="2" ></SELECT>
它正确显示在表单上,我可以使用JavaScript添加项目,但是当我去处理表单时,表单 *** 作页面会出现以下错误:
Element ICD9List is undefined in FORM.
我在初始表单页面上添加了cfparam标签,以及我收到错误的表单 *** 作页面.
不能为我的生活弄清楚为什么它没有将表单元素传递给动作页面.该方法是post,所以它应该捡起来.页面上的所有其他表单元素都可以正常使用.
<cfform action="updform.cfm" name="custform" method="POST">
我也尝试使用custform.icd9List并得到了同样的问题:
Element ICD9List is undefined in CUSTFORM.
这个页面是一些非常遗留的代码,我们无法真正回过头来重构太多.我唯一想到的是,当页面首次加载时,多选选项为空白,然后我们在事后通过d出窗口中的JavaScript添加选项.当我在Chrome中检查元素时,在我添加选项后,它们就在那里,但我想知道它是否仍被视为空白的多选列表.我知道如果我删除了多个属性并将表单元素视为单个下拉列表,它在表单转储中显示一个值,但只显示第一个(或任何选定的)值.
开始认为答案可能是填充选项值的隐藏字段,并让表单读取.
解决方法 向多选列表添加选项是不够的.他们也必须被选中.否则,该列表不被视为 successful control,该字段将不会传递到 *** 作页面(强调我的)A successful control is “valID” for submission. Every successful
control has its control name paired with its current value as part of
the submitted form data set. A successful control must be defined
within a FORM element and must have a control name.However:
Controls that are Disabled cannot be successful. If a form contains more than one submit button,only the activated submit button is successful. All “on” checkBoxes may be successful. For radio buttons that share the same value of the name attribute,only the “on” radio button may be successful. For menus,the control name is provIDed by a SELECT element and values are provIDed by OPTION elements. Only selected options may be
successful. When no options are selected,the control is not
successful and neither the name nor any values are submitted to the
server when the form is submitted. The current value of a file select is a List of one or more file names. Upon submission of the form,the contents of each file are
submitted with the rest of the form data. The file contents are
packaged according to the form’s content type. The current value of an object control is determined by the object’s implementation.
我怀疑表单在提交表单之前没有强制项目被“选中”,这就是为什么行动页面上没有显示任何内容的原因.
总结以上是内存溢出为你收集整理的ColdFusion 10获取元素在表单错误中未定义全部内容,希望文章能够帮你解决ColdFusion 10获取元素在表单错误中未定义所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)