以文本方式查看主题 - Foxtable(狐表) (http://foxtable.net/bbs/index.asp) -- 专家坐堂 (http://foxtable.net/bbs/list.asp?boardid=2) ---- [求助]我手机上传图片·项目上怎么没有呢 (http://foxtable.net/bbs/dispbbs.asp?boardid=2&id=126779) |
-- 作者:liumiao123 -- 发布时间:2018/10/29 9:37:00 -- [求助]我手机上传图片·项目上怎么没有呢 Select Case e.Path Case "test.htm" wb.AddToast("","t1", "正在上传",1) \'定义提示 wb.AddForm("","form1","test.htm").attribute= """ With wb.AddInputGroup("form1","ipg1","客户资料") .AddInput("姓名","姓名","Text").value = "舒淇" .AddInput("年龄","年龄","number").Value = "28" .AddInput("日期","日期","date").value = #10/12/2012# With .AddUploader("up1","照片",True) .AddImage("./images/shuqi1.jpg") .AddImage("./images/shuqi2.jpg") End With End With With wb.AddButtonGroup("form1","btg1",True) .Add("btn1", "确定", "submit") End With e.WriteString(wb.Build) \'生成网页 Dim nms() As String = {"姓名","年龄","日期"} \'不能为空的列名数组 For Each nm As String In nms If e.PostValues.ContainsKey(nm) = False Then \'生成错误提示页 With wb.AddMsgPage("","msgpage","增加失败", nm & "列不能为空!") .icon = "Warn" \'改变图标 .AddButton("btn1","返回").Attribute = "" End With e.WriteString(wb.Build) Return \'必须返回 End If Next nms = New String() {"姓名","年龄","日期","照片"} \'重新定义了nms数组,增加了两列. Dim da As DataRow = DataTables("客户资料").AddNew() For Each nm As String In nms If e.PostValues.ContainsKey(nm) Then da(nm) = e.PostValues(nm) End If Next End Select 请老师帮忙看看·是不是代码错了· 我在手机上传图片·项目上怎么不显示呢·· |
-- 作者:liumiao123 -- 发布时间:2018/10/29 10:36:00 -- 还有一段·也请老师看下· 就是图片添加只能添加1个·他出现第二个添加框·但是没有用·会顶掉第一个·请问什么怎么回事· 也是不在项目中出现图片·· 代码如下 Select Case e.Path Case "test.htm" If e.PostValues.Count = 0 Then wb.AddForm("","form1","test.htm") With wb.AddInputGroup("form1","ipg1","客户管理") .AddInput("姓名","姓名","Text") \'前一个"姓名"是ID,后一个"姓名"是标题 .AddInput("年龄","年龄","number") .AddInput("日期","日期","date") With .AddUploader("up1","照片",True) End With With wb.AddButtonGroup("form1","btg1",True) .Add("btn1", "确定", "submit") End With End With e.WriteString(wb.Build) Else Dim nms() As String = {"姓名","年龄","日期","照片"} \'不能为空的列名数组 For Each nm As String In nms Next nms = New String() {"姓名","年龄","日期","照片"} \'重新定义了nms数组,增加了两列. Dim da As DataRow = DataTables("客户资料").AddNew() For Each nm As String In nms If e.PostValues.ContainsKey(nm) Then da(nm) = e.PostValues(nm) End If Next \'保存并生成增加成功提示页面 da.save() With wb.AddMsgPage("","msgpage","增加成功", "好好学习,天天向上") \'生成成功提示页 .AddButton("btn1","继续增加","test.htm") End With e.WriteString(wb.Build) End If End Select |
-- 作者:有点甜 -- 发布时间:2018/10/29 11:04:00 -- 1、你没有接收图片?
Case "receive.htm"
2、看看 http://www.foxtable.com/mobilehelp/scr/0106.htm
|
-- 作者:liumiao123 -- 发布时间:2018/10/29 11:54:00 -- 回复:(有点甜)1、你没有接收图片?  ... 图片有了·但是项目上海是空白的·· ······请问怎么修改呢 Select Case e.Path Case "test.htm" If e.PostValues.Count = 0 Then wb.AddForm("","form1","test.htm") With wb.AddInputGroup("form1","ipg1","客户管理") .AddInput("姓名","姓名","Text") \'前一个"姓名"是ID,后一个"姓名"是标题 .AddInput("年龄","年龄","number") .AddInput("日期","日期","date") With .AddUploader("up1","照片",True) For Each key As String In e.Files.Keys For Each fln As String In e.Files(key) e.SaveFile(key,fln,"d:\\web\\uploadfiles\\" & fln) \'保存接收到的文件 Next Next End With With wb.AddButtonGroup("form1","btg1",True) .Add("btn1", "确定", "submit") .Add("btn2", "返回主页", "", "default.htm") \'单击这个按钮可以打开主页 End With End With e.WriteString(wb.Build) Else Dim nms() As String = {"姓名","年龄","日期","照片"} \'不能为空的列名数组 For Each nm As String In nms Next nms = New String() {"姓名","年龄","日期","照片"} \'重新定义了nms数组,增加了两列. Dim da As DataRow = DataTables("客户资料").AddNew() For Each nm As String In nms If e.PostValues.ContainsKey(nm) Then da(nm) = e.PostValues(nm) End If Next \'保存并生成增加成功提示页面 da.save() With wb.AddMsgPage("","msgpage","增加成功", "好好学习,天天向上") \'生成成功提示页 .AddButton("btn1","继续增加","test.htm") End With e.WriteString(wb.Build) End If End Select |
-- 作者:有点甜 -- 发布时间:2018/10/29 13:12:00 -- 这个代码,写到else那里,也就是addnew那段里面去
For Each key As String In e.Files.Keys
For Each fln As String In e.Files(key)
e.SaveFile(key,fln,"d:\\web\\uploadfiles\\" & fln) \'保存接收到的文件
Next
Next
|