以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.com/bbs/index.asp)
--  专家坐堂  (http://foxtable.com/bbs/list.asp?boardid=2)
----  无法跳转页面  (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=104172)

--  作者:zhangjian222200
--  发布时间:2017/7/24 19:57:00
--  无法跳转页面
Dim e As RequestEventArgs = args(0)                             \'验证页面(注册第2页)
Dim wb As New weui

Dim huiybh As String = e.PostValues("hybh")  \'定义,会员编号
Dim ibianh As String = e.PostValues("ibianh")  \'定义,员工编号

Dim igl As DataRow \'定义,查找会员(客服等官方人员)管理的行
If huiybh <> "" AndAlso ibianh <> "" Then
    igl = DataTables("会员资料").SQLFind("会员编号 = \'" & huiybh & "\' and (客服_编号 = \'" & ibianh & "\' or 经理_编号 = \'" & ibianh & "\' or 管理_编号 = \'" & ibianh & "\' )")
Else
    e.WriteString("数据传递错误,你可能断网了!")
    Return ""
End If

If igl IsNot Nothing Then
    msgbox(1)’执行了
    wb.InsertHTML("<meta http-equiv=\'Re-fresh\' con-tent=\'0; ur-l=/guanli_soushy.htm\'>") \'跳转页面
    无法跳转页面
    guanli_soushy.htm,可以正常进入
Else
    e.WriteString("没有找到会员!")
    Return ""
End If
e.WriteString(wb.Build) \'生成网页
[此贴子已经被作者于2017/7/24 20:01:25编辑过]

--  作者:有点蓝
--  发布时间:2017/7/24 21:01:00
--  
函数外部是怎么调用的,有没有返回,是不是后面有其它代码

Functions.Execute("xxxx",e)
return

--  作者:zhangjian222200
--  发布时间:2017/7/25 8:26:00
--  
外部函数这样调用的
        Case "guanli_soushy.htm" 1楼代码跳转后进入的页面,输入guanli_soushy.htm,可以进入页面,但是就是无法实现1楼的跳转                               
            Functions.Execute("guanli_soushy",e)
            return ’加了return,还是没有跳转
        Case "guanli_soushy1.htm" 1楼代码的页面
            Functions.Execute("guanli_soushy1",e)
[此贴子已经被作者于2017/7/25 8:28:33编辑过]

--  作者:有点甜
--  发布时间:2017/7/25 8:40:00
--  

1、试试

 

e.response.Redirect("新地址")

 

2、如果你用ajax调用的话,你要在你的js里面跳转,不能直接在代码跳转

 

http://www.foxtable.com/mobilehelp/scr/0129.htm

 


--  作者:zhangjian222200
--  发布时间:2017/7/25 9:01:00
--  
http://www.foxtable.com/mobilehelp/scr/0258.htm
因为涉及ajax调用,用上面页面的跳转方法,可以在js里实现网页跳转,哎菜鸟啊,还有个问题,见红字粗体

跳转js代码如下:
function validit_guanli_soushy0(){
    alert("ok");
    var result = submitAjaxForm(\'form1\',\'\',false);
    if (result ==\'OK\') {
    location="guanli_soushy.htm"}
    else if (result ==\'没有找到会员!\') {show(\'dlg1\')}
    else if (result ==\'数据传递错误,你可能断网了!\') {show(\'dlg2\')}
}

页面代码红色部分改为:
Dim e As RequestEventArgs = args(0)                             \'验证页面(注册第2页)
Dim wb As New weui

Dim huiybh As String = e.PostValues("hybh")  \'定义,会员编号  
’想传递huiybh到跳转后的页面,js里面
location="guanli_soushy.htm?a=huiybh "
这种怎么实现?
Dim ibianh As String = e.PostValues("ibianh")  \'定义,员工编号

Dim igl As DataRow \'定义,查找会员(客服等官方人员)管理的行
If huiybh <> "" AndAlso ibianh <> "" Then
    igl = DataTables("会员资料").SQLFind("会员编号 = \'" & huiybh & "\' and (客服_编号 = \'" & ibianh & "\' or 经理_编号 = \'" & ibianh & "\' or 管理_编号 = \'" & ibianh & "\' )")
Else
    e.WriteString("数据传递错误,你可能断网了!")
    Return ""
End If

If igl IsNot Nothing Then
    e.WriteString(“OK”)
    Return ""
Else
    e.WriteString("没有找到会员!")
    Return ""
End If
e.WriteString(wb.Build) \'生成网页

[此贴子已经被作者于2017/7/25 9:58:45编辑过]

--  作者:有点甜
--  发布时间:2017/7/25 10:20:00
--  

e.WriteString("OK-" & huiybh)

 

js代码改一下

 

var ary = result.split("-")

if (ary[0] == \'OK\') {location="guanli_soushy.htm?a=" + ary[1]}