Select Case e.path
Case "choose.htm","" '2.选择类型/系列/机型
Dim wb As New WeUI
wb.AddPageTitle("","choose","规格型号","") '标题
wb.AddForm("","form1","choose.htm") '表单
With wb.AddInputGroup("form1","ipg1","选择规格型号") '列表
'DataTables("机器规格").LoadFilter = "" '加载所有数据
'DataTables("机器规格").Load()
With .AddSelect("类型","类型","|" & DataTables("机器规格").SQLGetComboListString("类型"))
.Attribute = "onchange=""setAjaxOptions('系列','getmodel.htm','类型',false)""" 'setAjaxOptions用于根据后台数据动态生成列表项目
End With
With .AddSelect("系列","系列","")
.Attribute = "onchange='submitForm()'"
End With
.AddSelect("机型1","机型1","")
.AddSelect("机型2","机型2","")
End With
With wb.AddButtonGroup("form1","btg1",False) '按钮
.Add("btn1", "对比", "submit")
.Add("btn2", "返回","", "./product.htm") '跳转到产品首页..也就是上一页
End With
wb.AppendHTML("<script src='./lib/ajaxform.js'></script>")
e.WriteString(wb.Build) '生成网页
Case "getmodel.htm" '2.系列/机型下拉列表
Dim vals As String
If e.PostValues.Count = 1 Then
vals = "|" & DataTables("机器规格").SQLGetComboListString("系列","类型 = '" & e.PostValues("类型") & "'")
ElseIf e.PostValues.Count = 2 Then '当选择<系统>框值时,机型1/机型2的下拉取值框作如下变动
Dim Filter As String = "类型 = '" & e.PostValues("类型") & "' And 系列 = '" & e.PostValues("系列") & "'"
vals = "|" & DataTables("机器规格").SQLGetComboListString("机型", Filter)
End If
e.WriteString(vals)
End Select