首页新闻找找看学习计划

jquery 的ajaxFileUpload上传图片后,其它提交按钮无法进入到后台 .NET

0
悬赏园豆:20 [待解决问题]

小女子~~~~ 请教大侠们~~~~

.NET下 jquery 的ajaxFileUpload异步上传图片到服务器后,其它" 提交" 按钮无法进入到后台,其中 “提交”按钮调用的 调用的JS (OnClientClick="return IsBlank();") 能正常执行,就是无法 调用OnClick="BtnSaveInfo_ServerClick"此事件 进入到后台。如果不执行图片上传,提交按钮能正常使用。

在FireFox 浏览器下运行正常,在IE浏览器下不正常。

不知道朋友们,有没有遇到过这样的问题

前台js 代码:

    $.ajaxFileUpload
             (
                 {
                     url: 'handler/UploadImageHandler.ashx',
                     fileFilter: '(.jpeg,.jpg,.bmp,.gif,.png)',
                     secureuri: false,
                     fileElementId: 'uploadTitleFile',
                     dataType: 'json',
                     success: function (data, status) {
                         if (data.status == 'true') {

                             var filePath = data.msg.Origin;
                             var fileName = filePath.substr(filePath.lastIndexOf('/') + 1);

                             $("#<%=TxtImageName.ClientID %>").val(fileName);
                             $("#<%=TxtImageUrl.ClientID %>").val(filePath);
                             $("#<%=imgUpload.ClientID %>").attr("src", filePath);
                             $("#<%=imgDiv.ClientID %>").show();

                             var file = $("#uploadTitleFile");
                             file.after(file.clone().val(""));
                             file.remove();

                             alert("上传成功");
                             

                         }
                         else {
                             alert(data.msg);
                         }
                     },
                     error: function (data, status, e)//服务器响应失败处理函数
                     {
                         alert(e);
                     }
                 }
             );

        }

前台界面:

    <tr >
                    <td style="text-align:right;width:100px;">
                        标题图片:
                    </td>
                    <td  class="border_right_none" style="padding-top:8px;" >
                        <a href="#" id="A1" class="addImage" title="添加标题图片" href="javascript:void(0);">
                            <input type="file" id="uploadTitleFile" name="uploadTitleFile" class="addImage" onchange="uploadImage(this);" />
                        </a>
                        &nbsp;&nbsp;&nbsp; <span id="lblFileType" style="color:red;font-size:small;">(请上传格式为GIF,JPEG,JPG,BMP,PNG的图片 大小为2M以内)</span>
                        <asp:TextBox ID="TxtImageName" runat="server" MaxLength="40" CssClass="input_hide"></asp:TextBox>
                        <asp:TextBox ID="TxtImageUrl" runat="server" MaxLength="40" CssClass="input_hide"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td></td>
                    <td class="border_right_none" style="padding-top:8px;">
                        <div id="imgDiv" runat="server" style="display:none; float:left;">  
                            <img id="imgUpload" runat="server" src="" />
                        </div>
                    </td>
                </tr>

  <tr>
             <td></td>
             <td class="border_right_none" style="padding-top:20px; vertical-align:middle;">
                        <asp:ImageButton ID="BtnSaveInfo" runat="server" ImageUrl="img/button_queding2.png" Width="66" Height="30" AlternateText="确定" OnClick="BtnSaveInfo_ServerClick" OnClientClick="return IsBlank();" />
                        <asp:ImageButton ID="BtnBack" runat="server" ImageUrl="img/button_quxiao.png" Width="58" Height="30" AlternateText="取消" OnClick="BtnBack_ServerClick" />
               </td>
        </tr>

dmjhday的主页 dmjhday | 初学一级 | 园豆:63
提问于:2015-01-08 10:50
< >
分享
所有回答(1)
0
醉心 | 园豆:99 (初学一级) | 2015-01-08 11:26

刚看了这个链接,我这里面OnClientClick 事件是用来验证,验证通过了,已经返回了true,还是不能正常执行到后台

支持(0) 反对(0) dmjhday | 园豆:63 (初学一级) | 2015-01-08 11:36
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册