以文本方式查看主题

-  Foxtable(狐表)  (http://www.foxtable.com/bbs/index.asp)
--  专家坐堂  (http://www.foxtable.com/bbs/list.asp?boardid=2)
----  [求助]如何让Dialog对话框选择“是”执行后边代码  (http://www.foxtable.com/bbs/dispbbs.asp?boardid=2&id=180113)

--  作者:洮沙
--  发布时间:2022/9/28 22:40:00
--  [求助]如何让Dialog对话框选择“是”执行后边代码
老师,参考http://www.foxtable.com/mobilehelp/topics/0101.htm制作的页面

Dim res As String = "客户名称:" & kh & "<p/>客户类型:" & khlx]
 e.WriteString("QR" & res) \'返回确认
Return ""
麻烦问一下,如何做到点击下图“是”服务器继续执行以后代码:

图片点击可在新窗口打开查看此主题相关图片如下:微信截图_20220928223301.png
图片点击可在新窗口打开查看

也就是,有选择执行:
With wb.AddDialog("", "dlg1", "再次确认", "") \'登记失败提示框
    .AddButton("btnOK", "是").Kind = 1       \'代码怎么设置
    .AddButton("btnOK", "否")                    
End With

js代码:
function myfunction(){
    var result = submitAjaxForm(\'form1\',\'\',false);
    if (result.substring(0,2) ==\'OK\') {
{showDialog(\'dlg2\',\'提示\',result.substring(2))}
}
else if (result.substring(0,2) ==\'QR\')
{
    {showDialog(\'dlg1\',\'再次确认\',result.substring(2))}
   else {showDialog(\'dlg2\',\'错误\',result)}
}

[此贴子已经被作者于2022/9/29 5:57:17编辑过]

--  作者:有点蓝
--  发布时间:2022/9/29 8:40:00
--  
只能重新提交请求到服务器,类似:

.AddButton("btnOK", "是").attribute = "onclick=\'sendAjaxText("""",""accept.htm"")\'"

--  作者:洮沙
--  发布时间:2022/9/29 9:18:00
--  
谢谢,蓝老师,有其他办法实现FT中以下效果了吗?
  Dim Result As DialogResult
                Result = MessageBox.Show("确定要删除此客户吗?删除后不可恢复!", "警告", MessageBoxButtons.YesNo, MessageBoxIcon.Warning)
                If Result = DialogResult.Yes Then
                    .Current.Delete
                    .Save()
                Else
                End If


--  作者:有点蓝
--  发布时间:2022/9/29 9:25:00
--  
不能这样用。判断验证应该单独一个页面处理:http://www.foxtable.com/mobilehelp/topics/0104.htm

也就是在进入业务页面前,先做所有判断、警告和提示

--  作者:洮沙
--  发布时间:2022/9/29 9:27:00
--  
老师,我是参照http://www.foxtable.com/mobilehelp/topics/0101.htm这页面做的,也是单独一页判断的,计划正式保存前有个确认选择判断。
[此贴子已经被作者于2022/9/29 9:28:46编辑过]

--  作者:有点蓝
--  发布时间:2022/9/29 9:39:00
--  
改为4楼的帮助用法