以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.net/bbs/index.asp)
--  专家坐堂  (http://foxtable.net/bbs/list.asp?boardid=2)
----  用Weui做一个调查表单,同时列出了多个单选按钮组,但是在手机访问时,始终只有第一个能选,后面的都无法点选,是代码有什么问题么?  (http://foxtable.net/bbs/dispbbs.asp?boardid=2&id=97512)

--  作者:ycwk
--  发布时间:2017/3/13 20:44:00
--  用Weui做一个调查表单,同时列出了多个单选按钮组,但是在手机访问时,始终只有第一个能选,后面的都无法点选,是代码有什么问题么?
用Weui做一个调查表单,同时列出了多个单选按钮组,但是在手机访问时,始终只有第一个能选,后面的都无法点选,是代码有什么问题么?


图片点击可在新窗口打开查看此主题相关图片如下:1.png
图片点击可在新窗口打开查看


--  作者:有点蓝
--  发布时间:2017/3/13 20:52:00
--  
不要设置相同的ID:http://www.foxtable.com/mobilehelp/scr/0052.htm

With wb.AddRadioGroup("form1","rdg1","浏览器")
    .Add("a1","是")
    .Add("a2","否") \'默认勾选
End With

With wb.AddRadioGroup("form1","rdg1","其它")
    .Add("b1","是")
    .Add("b2","否") \'默认勾选
End With

--  作者:ycwk
--  发布时间:2017/3/13 21:36:00
--  
为什么用下面这段代码,点击按钮提交时,只能提交 科室,姓名,岗位,电话  几个字段? Q1  -Q7 都无法提交?
Dim e As RequestEventArgs = args(0)
Dim wb As New weui
wb.InsertHTML("<h3 align=\'center\' style=\'margin-top:5px\'>服务满意度调查</h3>")      \'插入表头
If e.PostValues.Count = 0 Then \'生成增加订单网页
    wb.AddForm("","form1","SatisSurvey.htm")

    With wb.AddRadioGroup("form1","rdg1","应用")
                .Add("a1","是")
                .Add("a2","否")
    End With
   
    With wb.AddRadioGroup("form1","rdg2","应用软件是否容易操作和使用")
                .Add("b1","是")
                .Add("b2","否")
    End With

    With wb.AddRadioGroup("form1","rdg3","应用软件是否容易操作和使用")
                .Add("c1","是")
                .Add("c2","否")
    End With

    With wb.AddRadioGroup("form1","rdg4","项目人员是否有效沟通并及时反馈")
                .Add("d1","是")
                .Add("d2","否")
    End With

    With wb.AddRadioGroup("form1","rdg5","您对项目人员工作态度是否满意")
                .Add("e1","是")
                .Add("e2","否")
    End With

    With wb.AddRadioGroup("form1","rdg6","您对项目人员技术水平是否认可")
                .Add("f1","是")
                .Add("f2","否")
    End With

    With wb.AddRadioGroup("form1","rdg7","故障响应速度是否及时")
                .Add("g1","是")
                .Add("g2","否")
    End With

    With wb.AddInputGroup("form1","ipg1","您对培训讲师专业知识的评价")
            .AddTextArea("bz",2).Placeholder = "请输入80字以内的备注"
    End With

    With wb.AddInputGroup("form1","ipg2","您对培训资料的评价")
            .AddTextArea("bz",2).Placeholder = "请输入80字以内的备注"
    End With


    With wb.AddInputGroup("form1","ipg3","现阶段科室急需解决的问题")
            .AddTextArea("bz",3).Placeholder = "请输入120字以内的备注"
    End With


    With wb.AddInputGroup("form1","ipg4","您的联系方式")
        .AddInput("科室","科室","text")
        .AddInput("姓名","姓名","text")
        .AddInput("岗位","岗位","text")
        .AddInput("电话","电话","text")
        .AddInput("提交日期","提交日期","date")
    End With

   With wb.AddButtonGroup("form1","btg1",True)
        .Add("btn1", "确定", "submit")
   End With

Else \'保存新增的调查单
    Dim dr As DataRow = DataTables("满意度调查表").AddNew()
    Dim nms() As String = {"Q1","Q2","Q3","Q4","Q5","Q6","Q7"}
    For Each nm As String In nms
        dr(nm) = e.PostValues(nm)
msgbox(nm & dr(nm))    \' dr(nm) 为空值
    Next
    dr.Save()

    nms=New String(){"科室","姓名","岗位","电话"}
    For Each nm As String In nms
        dr(nm) = e.PostValues(nm)

    Next
    dr.Save()

    With wb.AddMsgPage("","msgpage","增加成功", "您的意见我们已经收到,感谢你的反馈!") \'增加订单成功提示信息
        .AddButton("btn1","继续增加","SatisSurvey.htm")
        .AddButton("btn1","返回列表","list.htm") 
    End With
End If
e.WriteString(wb.Build) \'生成网页

--  作者:有点蓝
--  发布时间:2017/3/13 21:50:00
--  
Q1  -Q7 ?什么鬼来的?

整个网页开发都是通过
ID进行操作的,ID、ID、ID,.......

就如同窗口的控件名称不能重复一样,所以一个网页的元素ID绝对不能重复

Dim nms() As String = {"a1","b1","c1",......}

--  作者:ycwk
--  发布时间:2017/3/14 8:10:00
--  
q1~q7 是数据库表“满意度调查表” 的7个字段,  按下面的代码, 存在q1~q7 中的值始终是  a1~g1 ,为什么不是  " 是 " 或 " 否 "请问是什么鬼?

Dim e As RequestEventArgs = args(0)
Dim wb As New weui
wb.InsertHTML("<h3 align=\'center\' style=\'margin-top:5px\'>服务满意度调查</h3>")      \'插入表头
If e.PostValues.Count = 0 Then \'生成增加调查表网页
    wb.AddForm("","form1","SatisSurvey.htm")

    With wb.AddRadioGroup("form1","q1","应用")
                .Add("a1","是")
                .Add("a2","否")
    End With
   
    With wb.AddRadioGroup("form1","q2","应用软件是否容易操作和使用")
                .Add("b1","是")
                .Add("b2","否")
    End With

    With wb.AddRadioGroup("form1","q3","应用软件是否容易操作和使用")
                .Add("c1","是")
                .Add("c2","否")
    End With

    With wb.AddRadioGroup("form1","q4","项目人员是否有效沟通并及时反馈")
                .Add("d1","是")
                .Add("d2","否")
    End With

    With wb.AddRadioGroup("form1","q5","您对项目人员工作态度是否满意")
                .Add("e1","是")
                .Add("e2","否")
    End With

    With wb.AddRadioGroup("form1","q6","您对项目人员技术水平是否认可")
                .Add("f1","是")
                .Add("f2","否")
    End With

    With wb.AddRadioGroup("form1","q7","故障响应速度是否及时")
                .Add("g1","是")
                .Add("g2","否")
    End With

    With wb.AddInputGroup("form1","ipg1","您对培训讲师专业知识的评价")
            .AddTextArea("bz",2).Placeholder = "请输入80字以内的备注"
    End With

    With wb.AddInputGroup("form1","ipg2","您对培训资料的评价")
            .AddTextArea("bz",2).Placeholder = "请输入80字以内的备注"
    End With


    With wb.AddInputGroup("form1","ipg3","现阶段科室急需解决的问题")
            .AddTextArea("bz",3).Placeholder = "请输入120字以内的备注"
    End With


    With wb.AddInputGroup("form1","ipg4","您的联系方式")
        .AddInput("科室","科室","text")
        .AddInput("姓名","姓名","text")
        .AddInput("岗位","岗位","text")
        .AddInput("电话","电话","text")
        .AddInput("提交日期","提交日期","date")
    End With

   With wb.AddButtonGroup("form1","btg1",True)
        .Add("btn1", "确定", "submit")
   End With

Else \'保存新增的调查单
    Dim dr As DataRow = DataTables("满意度调查表").AddNew()
    Dim nms() As String = {"q1","q2","q3","q4","q5","q6","q7"}
    For Each nm As String In nms
        dr(nm) = e.PostValues(nm)

    Next
    dr.Save()

    nms=New String(){"科室","姓名","岗位","电话"}
    For Each nm As String In nms
        dr(nm) = e.PostValues(nm)

    Next
    dr.Save()

    With wb.AddMsgPage("","msgpage","增加成功", "您的意见我们已经收到,感谢你的反馈!") \'增加订单成功提示信息
        .AddButton("btn1","继续增加","SatisSurvey.htm")
        .AddButton("btn1","返回列表","list.htm") 
    End With
End If
e.WriteString(wb.Build) \'生成网页
[此贴子已经被作者于2017/3/14 8:54:46编辑过]

--  作者:ycwk
--  发布时间:2017/3/14 8:42:00
--  
帮助里面有这么一句话,    请问value的值设置  具体该怎么写代码?      

单选列表项的属性有:

Value字符型,勾选后传递给服务端的值,如果不设置,将传递ID值给服务端。
Enabld逻辑型,设置为False,将无法勾选此列表项。    

--  作者:有点蓝
--  发布时间:2017/3/14 9:05:00
--  
With wb.AddRadioGroup("form1","q2","应用软件是否容易操作和使用")
                .Add("b1","是").Value = "是"
                .Add("b2","否").Value = "否"
    End With

--  作者:ycwk
--  发布时间:2017/3/14 11:27:00
--  
用下面的代码,为什么q8 q9 q10 三个备注框的 数据保存不到数据库中去,其余的可以?
Dim e As RequestEventArgs = args(0)
Dim wb As New weui
wb.InsertHTML("<h3 align=\'center\' style=\'margin-top:5px\'>服务满意度调查</h3>")      \'插入表头
If e.PostValues.Count = 0 Then \'生成增加调查表网页
    wb.AddForm("","form1","SatisSurvey.htm")

    With wb.AddRadioGroup("form1","q1","应用")
                .Add("a1","是").Value="是"      \'第一个"是" 是界面输入提示, 第二个"是"是往数据库存的值
                .Add("a2","否").Value="否"
               
    End With
   
    With wb.AddRadioGroup("form1","q2","应用软件是否容易操作和使用")
                .Add("b1","是").Value="是"
                .Add("b2","否").Value="否"
    End With

    With wb.AddRadioGroup("form1","q3","应用软件是否容易操作和使用")
                .Add("c1","是").Value="是"
                .Add("c2","否").Value="否"
    End With

    With wb.AddRadioGroup("form1","q4","项目人员是否有效沟通并及时反馈")
                .Add("d1","是").Value="是"
                .Add("d2","否").Value="否"
    End With

    With wb.AddRadioGroup("form1","q5","您对项目人员工作态度是否满意")
                .Add("e1","是").Value="是"
                .Add("e2","否").Value="否"
    End With

    With wb.AddRadioGroup("form1","q6","您对项目人员技术水平是否认可")
                .Add("f1","是").Value="是"
                .Add("f2","否").Value="否"
    End With

    With wb.AddRadioGroup("form1","q7","故障响应速度是否及时")
                .Add("g1","是").Value="是"
                .Add("g2","否").Value="否"
    End With

    With wb.AddInputGroup("form1","q8","您对培训讲师专业知识的评价")
            .AddTextArea("bz1",2).Placeholder = "请输入80字以内的备注"
    End With

    With wb.AddInputGroup("form1","q9","您对培训资料的评价")
            .AddTextArea("bz2",2).Placeholder = "请输入80字以内的备注"
    End With


    With wb.AddInputGroup("form1","q10","现阶段科室急需解决的问题")
            .AddTextArea("bz3",3).Placeholder = "请输入120字以内的备注"
    End With


    With wb.AddInputGroup("form1","ipg4","您的联系方式")
        .AddInput("科室","科室","text")
        .AddInput("姓名","姓名","text")
        .AddInput("岗位","岗位","text")
        .AddInput("电话","电话","text")
        .AddInput("提交日期","提交日期","date")
    End With

   With wb.AddButtonGroup("form1","btg1",True)
        .Add("btn1", "确定", "submit")
   End With

Else \'保存新增的调查单
    Dim dr As DataRow = DataTables("满意度调查表").AddNew()
    Dim nms() As String = {"q1","q2","q3","q4","q5","q6","q7","q8","q9","q10","科室","姓名","岗位","电话","提交日期"}
    For Each nm As String In nms
        dr(nm) = e.PostValues(nm)
    msgbox(nm & e.PostValues(nm))    \' dr(nm) 为空值
    Next
    dr.Save()

--  作者:ycwk
--  发布时间:2017/3/14 12:41:00
--  

求指导


--  作者:有点蓝
--  发布时间:2017/3/14 14:58:00
--  
Dim nms() As String = {"q1","q2","q3","q4","q5","q6","q7","bz1","bz2","bz3","科室","姓名","岗位","电话","提交日期"}