Re: [問題] file Submit
※ 引述《darkian (darkian)》之銘言:
: 第一次在這發文 ><
: 不知道版上大大有遇過這樣子的情境
: 以 asp.net MVC 開發,以下節錄片段 html
: @using (Html.BeginForm("action", "controller", FormMethod.Post, new { @id = "upload",style="margin-left: -1000%", enctype = "multipart/form-data" }))
: {
: <input type="file" id="ChoiceFile" name="ChoiceFile" style="filter:alpha(opacity=0); opacity:0;margin-left:
: 16%;margin-top: -12%;width:225px" onchange="fileNameChange(this.value)" />
: }
: <a id="uploadBtn" onclick="$('#upload').submit()" class="btn info" >匯入</a>
: 在 Chorme、Firefox 都可以在後台取得 ChoiceFile 的 File
: 唯獨在 IE 時不行……
: 而且在選擇檔案後再按「匯入」就不會進入該 action
: (如果什麼都不選按「匯入」卻可以進去……(╯ˊ_>ˋ)╯┴┴)
: 謝謝大家 ˊ_>ˋ
後來是採用 $.ajaxFileUpload
不過還是一樣有問題……
用 IE 偵錯發現是下面這一行
jQuery(form).submit();
有問題
原因:存取被拒…… orz
可是在同一個系統不同功能中
也用到同樣的 plugin
別人的可以順利過關我的卻不行(花惹……恩
目前仍持續用不同的方法測試
(如:改得和別人一樣、用最單純的版面測試 etc...
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 60.248.158.4
推
05/22 10:01, , 1F
05/22 10:01, 1F
→
05/22 10:30, , 2F
05/22 10:30, 2F
討論串 (同標題文章)