Foxtable(狐表)用户栏目专家坐堂 → [求助]submitAjaxFileds如何在函数中设置


  共有2520人关注过本帖树形打印复制链接

主题:[求助]submitAjaxFileds如何在函数中设置

帅哥哟,离线,有人找我吗?
无限5180
  1楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:童狐 帖子:284 积分:2793 威望:0 精华:0 注册:2012/10/26 0:45:00
[求助]submitAjaxFileds如何在函数中设置  发帖心情 Post By:2018/10/28 20:42:00 [只看该作者]

帮助中关于submitAjaxFileds函数示例
function setCodes(){
    var result= submitAjaxFileds('getCodes.htm','','province','county',false);
    if(result){
        var vals=result.split("|");
        if(vals.length==2){
            document.getElementById("areacode").value=vals[0];
            document.getElementById("postcode").value=vals[1];
        }
    }
}


Select Case e.Path
    Case "test.htm"
        Dim wb As New weui
        wb.AddForm("","form1","test.htm")
        With wb.AddInputGroup("form1","ipg1","
自动输入")
            With .AddSelect("province","
省市","|"+DataTables("行政区域").GetComboListString("省市"))
                .Attribute =  "onchange""setAjaxOptions('county','getCounties.htm','province',false)"""
            End With
            With .AddSelect("county","
","")
                .Attribute = "onchange=
'setCodes()'" '调用js函数
            End With
            .AddInput("areacode","
区号","text")
            .AddInput("postcode","
邮编","text")
        End With
        With wb.AddButtonGroup("form1","btg1",True)
            .Add("btn1", "
确定", "submit")
        End With
        wb.AppendHTML("<script src='./lib/ajaxform.js'></script>") '
引入脚本文件
        e.WriteString(wb.Build) '
生成网页
    Case  "getCounties.htm" '
根据输入的省,获取县市列表
        Dim pps As String = DataTables("
行政区域").GetComboListString("县市","省市='" & e.Values("province") & "'")
        e.WriteString("|" & pps)
    Case "getCodes.htm" '
根据输入的省和县,获取区号有邮编
        Dim dr As DataRow = DataTables("
行政区域").Find("省市='" & e.Values("province") & "' and 县市='" & e.values("county") & "'")
       
If dr IsNot Nothing Then
           e.WriteString(dr("区号") & "|" & dr("邮编"))
        End If
End Select


请问如何把test.htm网页从HttpRequest中放入到函数中,拜托!!!

[此贴子已经被作者于2018/10/28 20:55:31编辑过]

 回到顶部
帅哥哟,离线,有人找我吗?
有点甜
  2楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:版主 帖子:85326 积分:427815 威望:0 精华:5 注册:2012/10/18 22:13:00
  发帖心情 Post By:2018/10/29 8:47:00 [只看该作者]


 回到顶部