进入index_shaix.htm页面,msgbox1、2、3、4执行了,然后没有跳转页面,js的ok没有显示,检查了好久,也没看出原因,麻烦看看
以下是index_shaix.htm页面代码:
Dim e As RequestEventArgs = args(0) '首页筛选
Select Case e.Path
Case "index_shaix.htm"
Dim wb As New weui
wb.AddTopTips("","toptip1","") '用于显示动态错误提示
With wb.AddArticle("","ar1")
.AddImage("./images/langwo/logo1.jpg")
.Attribute = "style='padding:0em;'"
End With
msgbox(1)
wb.AddForm("","form1","index_shaix.htm").Attri-bute="onsu-bmit='ret-urn validit_index_shaix()'"
With wb.AddInputGroup("form1","ipg1","首页筛选设置(都是选填哦!)")
.AddSelect("zxnl","最小年龄","|18|19|20|21|22|23|24|25|26|27|28|29|30|31|32|33|34|35|40|50|60")
.AddSelect("zdnl","最大年龄","|18|19|20|21|22|23|24|25|26|27|28|29|30|31|32|33|34|35|40|50|60|99")
.AddSelect("tdxl","TA的学历","|初中或高中|大专|本科|硕士或博士")
.AddSelect("hyzk","婚姻状况","|未婚|已婚|离异|丧偶")
msgbox(2)
With wb.AddButtonGroup("form1","btg1",True)
.Add("btn1", "确定","submit")
End With
End With
msgbox(3)
wb.AppendHTML("<script src='./lib/ajaxform_index_shaix.js'></script>") '引入脚本文件
msgbox(4)
e.WriteString(wb.Build) '生成网页
End Select
这是js代码:文件路径:E:\web\lib\ajaxform_index_shaix.js,通用头路径:e:\web
function validit_index_shaix(){
alert(ok!);
var result=submitAjaxFileds("index_shaixyz.htm","","zxnl","zdnl","tdxl","hyzk",false);
if(result=="OK"){
return true;
}
else{
showTopTips("toptip1",result,2000);
return false;
}
}
这是验证及保存页面:(所以msgbox都没有执行)
'首页筛选验证
Dim e As RequestEventArgs = args(0) '验证页面(注册第2页)
Select Case e.Path
Case "index_shaixyz.htm"
Dim wb As New weui
Dim drshouj As String = e.Cookies("isj") '从cookie取用户手机
Dim dr As DataRow = DataTables("会员资料").sqlFind("会员编号 = '" & drshouj & "'")
msgbox(11)
Dim zuixnl As String = e.PostValues("zxnl") '验证最小年龄 '测试代码:msgbox(e.PostValues("isr"))
Dim zuidnl As String = e.PostValues("zdnl") '验证最大年龄
If zuidnl < zuixnl Then ’当最大年龄,小于最小年龄时,toptip无提示
msgbox(22)
e.WriteString("最大年龄必须大于最小年龄!")
Return ""
End If
msgbox(33)
If dr IsNot Nothing Then
dr("最小年龄") = e.PostValues("zxnl") '验证最小年龄 '测试代码:msgbox(e.PostValues("isr"))
dr("最大年龄") = e.PostValues("zdnl") '验证最大年龄
dr("TA的学历") = e.PostValues("tdxl") '验证TA的学历
dr("婚姻状况") = e.PostValues("hyzk") '验证婚姻状况
dr.save()
msgbox(44)
Else
msgbox("保存失败!请登录后,再使用首页筛选功能!")
End If
'With wb.AddMsgPage("","msgpage","注册成功", "本地自助服务,为您婚恋交友之路保驾护航") '生成成功提示页
'.AddButton("btn1","完善资料","/fillout.htm")
'End With
msgbox(55)
wb.InsertHTML("<meta http-equiv='Refresh' c>") '那么直接跳转到登录页面
e.WriteString(wb.Build) '生成网页
End Select
这是httprequest代码:
Case "index_shaix.htm" 'index.htm页面(设置筛选条件)
Functions.Execute("index_shaix",e)
Case "index_shaixyz.htm" 'index.htm页面(设置筛选条件验证)
Functions.Execute("index_shaixyz",e)
[此贴子已经被作者于2017/4/18 16:27:57编辑过]