以文本方式查看主题 - Foxtable(狐表) (http://foxtable.net/bbs/index.asp) -- 专家坐堂 (http://foxtable.net/bbs/list.asp?boardid=2) ---- [求助]setAjaxOptions代码求助 (http://foxtable.net/bbs/dispbbs.asp?boardid=2&id=146968) |
-- 作者:huangfanzi -- 发布时间:2020/3/6 21:04:00 -- [求助]setAjaxOptions代码求助 老师帮我看看这段代码有何问题,现在的情况是公司中能出现内容,选择公司后工程名称始终没可先内容,谢谢! Dim e As RequestEventArgs = args(0) Select Case e.Path Case "Xdcg.htm" Dim wb As New WeUI wb.AddPageTitle("","ph1","常规","生产任务通知下单") wb.AddForm("","form1","Xdcg.htm") With wb.AddInputGroup("form1","ipg1","") With .AddSelect("公司","公司","|" & _dt销售合同.SQLGetComboListString("公司")) .Attribute = "on change=""set AjaxOptions(\'工程名称\',\'getBrands.htm\',\'公司\',false)""" (代码中on change与set AjaxOptions加了2个空格,要不然发不上来) End With .AddSelect("工程名称","工程名称","") End With With wb.AddButtonGroup("form1","btg1",True) .Add("btn1", "确定", "submit") End With e.WriteString(wb.Build) \'生成网页 Case "getBrands.htm" Dim pps As String pps = "|" & _dt销售合同.SQLGetComboListString("工程名称","公司=\'" & e.PostValues("公司") & "\'") e.WriteString(pps) End Select
[此贴子已经被作者于2020/3/6 21:14:51编辑过]
|
-- 作者:有点蓝 -- 发布时间:2020/3/6 21:15:00 -- 下面代码放到httprequest事件,不要放到函数里 Case "getBrands.htm" Dim pps As String pps = _dt销售合同.SQLGetComboListString("工程名称","|" & "公司=\'" & e.PostValues("公司") & "\'") e.WriteString(pps) |