以文本方式查看主题 - Foxtable(狐表) (http://foxtable.com/bbs/index.asp) -- 专家坐堂 (http://foxtable.com/bbs/list.asp?boardid=2) ---- setAjaxOptions获取不到值 求解 (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=150250) |
-- 作者:李孝春 -- 发布时间:2020/5/25 11:51:00 -- setAjaxOptions获取不到值 求解 setAjaxOptions获取不到值 求解 Case "huiyibianhao.htm" Dim vals As String Dim cmd As New S Q LC om mand cmd.Conn ecti on Name = "智慧党建" \'记得设置数据源名称 cmd.Comm andText = "Sele ct * From {会议列表}" Dim dt As DataTable = cmd.Ex ecu teReader If e.PostValues.Count = 1 Then vals = "|" & dt.sql Get Com boListString("单位名称") ElseIf e.PostValues.Count = 2 Then vals = "|" & dt.sql Get C om boListString("所属支部","单位名称=\'" & e.PostValues("单位名称") & "\'") ElseIf e.PostValues.Count = 3 Then Dim Filter As String = "单位名称=\'" & e.PostValues("单位名称") & "\' And 所属支部=\'" & e.PostValues("所属支部") & "\'" vals = "|" & dt.sql Get Co m boListString("会议编号", Filter) End If e.WriteString(vals) End Select Case "upload.htm" If e.PostValues.Count = 0 Then wb.AddPageTitle("","ph1","会议记录","瓮安县检察院【三会一课系统】") wb.AddForm("","form1","upload.htm") With wb.AddInputGroup("form1","ipg1","增加图片") \'.AddSelect("单位名称","单位名称","瓮安|") \'前一个"姓名"是ID,后一个"姓名"是标题 With .AddSelect("单位名称","单位名称","") .Attrib ute = "oncha nge=""set A jax Options(\'单位名称\',\'huiyibianhao.htm\',false)""" End With With .AddSelect("所属支部","所属支部","") .Attr ib ute = "onch ange=""set A jaxO ptions(\'所属支部\',\'huiyibianhao.htm\',\'单位名称\',false)""" End With With .AddSelect("会议编号","会议编号","") .Att rib ute = "onc ha nge=""set Aj ax Options(\'会议编号\',\'huiyibianhao.htm\',\'单位名称\',\'所属支部\',false)""" End With 红色部分不能用se tA jax Opt ions 从后台获取到单位名称 并根据单位名称获取到所属支部 然后获取会议编号 麻烦各位老师指导一下 谢谢!
|
-- 作者:有点蓝 -- 发布时间:2020/5/25 12:11:00 -- Case "huiyibianhao.htm" Dim vals As String Dim cmd As New S Q LC om mand cmd.Conn ecti on Name = "智慧党建" \'记得设置数据源名称 cmd.Comm andText = "Sele ct * From {会议列表} where 1=2" Dim dt As DataTable = cmd.Ex ecu teReader If e.PostValues.Count = 1 Then vals = "|" & dt.sql Get C om boListString("所属支部","单位名称=\'" & e.PostValues("单位名称") & "\'") ElseIf e.PostValues.Count = 2 Then Dim Filter As String = "单位名称=\'" & e.PostValues("单位名称") & "\' And 所属支部=\'" & e.PostValues("所属支部") & "\'" vals = "|" & dt.sql Get Co m boListString("会议编号", Filter) End If e.WriteString(vals) End Select ------------- Case "upload.htm" If e.PostValues.Count = 0 Then Dim cmd As New S Q LC om mand cmd.Conn ecti on Name = "智慧党建" \'记得设置数据源名称 cmd.Comm andText = "Sele ct * From {会议列表} where 1=2" Dim dt As DataTable = cmd.Ex ecu teReader wb.AddPageTitle("","ph1","会议记录","瓮安县检察院【三会一课系统】") wb.AddForm("","form1","upload.htm") With wb.AddInputGroup("form1","ipg1","增加图片") \'.AddSelect("单位名称","单位名称","瓮安|") \'前一个"姓名"是ID,后一个"姓名"是标题 With .AddSelect("单位名称","单位名称","|" & dt.sql Get Com boListString("单位名称")) .Attr ib ute = "onch ange=""set A jaxO ptions(\'所属支部\',\'huiyibianhao.htm\',\'单位名称\',false)""" End With With .AddSelect("所属支部","所属支部","") .Att rib ute = "onc ha nge=""set Aj ax Options(\'会议编号\',\'huiyibianhao.htm\',\'单位名称\',\'所属支部\',false)""" End With |
-- 作者:李孝春 -- 发布时间:2020/5/25 13:20:00 -- 回复:(有点蓝)Case "huiyibianhao.htm" ... With .AddSelect("单位名称","单位名称","|" & dt.sqlGetComboListString("单位名称")) .Attribute = "onch ange=""setA ja xOptions(\'所属支部\',\'huiyibianhao.htm\',\'单位名称\',false)""" End With With .AddSelect("所属支部","所属支部","") .Attribute = "onch ange=""set Aja x Options(\'会议编号\',\'huiyibianhao.htm\',\'单位名称\',\'所属支部\',false)""" End With With .AddSelect("会议编号","会议编号","|" & dt.sqlGetComboListString("会议编号")) End With 谢谢老师 经过参照学习,上述代码实现了功能需求,如果还有更简单的写法,还请老师多多指导下,灰常感谢!
|
-- 作者:有点蓝 -- 发布时间:2020/5/25 13:33:00 -- 没有更简单的写法了 |