多选框,弹出问题 [英] Multiple select box, pop up question

查看:68
本文介绍了多选框,弹出问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嘿所有人,


我不确定我的问题是需要在这里还是在冷血中。如果我的问题是在错误的部分我很抱歉提前将其移动到正确的部分。


基本上我有一个多选框。它的工作除了我希望添加到它的这一部分。我的第一个框称为项目成员,显示用户可以选择发送电子邮件到另一个框称为受理人,这是您选择的用户发送电子邮件至。


我要做的不是选择要发送电子邮件的用户而是单击提交。我希望他们需要选中下面显示的名为assignees的复选框。如果选中该复选框(并且在受理人框中有用户),则会在我单击提交时向所选用户发送电子邮件。但是,如果未选中该复选框,则需要它能够执行两项操作。如果在受理人框中有用户我需要弹出一个错误,说他们需要选中复选框。但如果在受让人的盒子里没有用户,那么我就不需要出错就可以提交表格。


现在我唯一能做的就是发送电子邮件只要选中该复选框,就选择用户。如果未选中该复选框,它将不会发送电子邮件,您将收到一个很好的冷融合错误。它主要是弹出工作,我不确定。


但是提前感谢你的帮助,

Rach


这里是表格

Hey Everyone,

Well i am not sure if my question needs to be here or in coldfusion. If i have my question is in the wrong section i am sorry in advance an will move it to the correct section.

Basically i have a multiple select box. An it works except for this one part i want to add to it.The first box i have is called project members which shows the users you can choose to send an email to and the other box is called assignees which is the users that you selected to send an email to.

What i am trying to do is instead of just choosing the users you want to send an email to and click submit. i want them to be required to select this check box that appears below it called assignees.If the check box is selected (and there are users in the assignees box) it will send an email to the the users selected when i click on submit.However, if the check box is not selected i need it be able to do 2 things. If there are users in the assignees box i need an error to pop up saying that they need to select the check box. But if there are no users in the assignees box then i need no errors to come up an just submit the form.

Right now the only thing i have working is i can send an email to the user selected as long as the check box is selected. if the check box is not selected it will not send an email an you get a nice cold fusion error. Its mostly getting the pop up working that i am not sure about.

But thank you in advance for all the help,
Rach

here is the form

展开 | 选择 | Wrap | 行号

推荐答案

创建一个验证函数来调用在onsubmit事件的形式:
Create a validation function to call in the form onsubmit event:
展开 | 选择 | Wrap | 行号


嘿Acoder,


我想知道我可以把它放到我现在拥有的另一个验证页面吗?

原始表格很长,所以我做空了它显示了我正在使用的东西。但无论如何在我的原始表单页面上我有这一行

Hey Acoder,

well i was wondering could i just put it with another validation page i have now?
the original form is to long so i shorted it to show what i was working with. but anyway on my original form page i have this line

展开 | 选择 | Wrap | 行号


您可以将其添加到当前验证函数。


要验证复选框,你通常会循环它们,但如果你只有一个,你可以直接检查它,例如
You can add it to the current validate function.

To validate checkboxes, you''d normally loop over them, but if you only have one, you can just check it directly, e.g.
展开 | 选择 | Wrap | 行号


这篇关于多选框,弹出问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆