本文介绍了在表单提交上,文件字段在Internet Explorer 9中清除的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我认为这个问题与这个问题有关:



我有以下表格和1个IE9用户报告问题。他们能够浏览并从他们的电脑中选择一个文件。但是,当他们点击按钮提交表单时,图像字段被清除,因此应用程序将返回错误请选择图像。

我无法复制问题。

上传照片(第1步,共2步)



 < ; div class =box-content> 
< form encType =multipart / form-datamethod =postname =galleryuploadformaction =>
< table>
< tbody>< tr>< td class =field_namevAlign =topwidth =70>图片:< span class =red_highlight> *< / span> < / td>< td><输入名称=photo_imagetype =file>< br>
< span class =form_hint>所有图片必须是:< / span>
< ul>< li class =form_hint> JPEG格式(最后是.jpg)< / li>
< li class =form_hint> RGB格式< / li>
< li class =form_hint>在< a href =http://www.ephotozine.com/e2signup> e2的最长边(大尺寸)上,图片的尺寸将调整为1000x1000成员< / A>和标准会员600x600(普通尺寸)< / li>< / ul>

< / td>< / tr>
< tr>< td class =field_namevAlign =top> Adult:< / td>< td>< input name =photo_adultvalue =1type =复选框><峰; br>
< span class =form_hint>如果您的照片包含成人内容,请勾选。< br>
< strong>重要提示:< / strong>我们不接受色情图片,并保留删除这些材料的权利。 < /跨度>
< / td>< / tr>
< tr>< td colSpan =2align =center>
< input name =actionvalue =上传照片type =hidden>
< input onclick =submitform('galleryuploadform'); display_white_box('photo_upload_lightbox'); closeKeepAlive(); name =buttonvalue =上传照片type =button>< / td>< / tr>
< / tbody>< / table>
< / form>


< div class =clear>< / div>< / div>

我们有提交表单的submitform(),display_white_box()显示一个对话框消息,上传和closeKeepAlive()这是一个与Mac上的Safari相关的修复。我已经提交了一个JavaScript方法,因为如果我没有在上传对话框的动画GIF不动画。



正如我所说,我不能复制它在任何机器或任何其他浏览器。

解决方案

没有解决方案。这是Internet Explorer中的一个错误。


I think this problem is related to this question:

Clicking submit clears file field instead of submitting the form (IE9)

I have the following form and 1 IE9 user reporting an issue. They are able to browse and select a file from their computer. But when they click the button to submit the form the image field is cleared and thus the application returns the error to 'please select an image'.

I cannot replicate the problem.

Upload a Photo (Step 1 of 2)

    <div class="box-content">
    <form encType="multipart/form-data" method="post" name="galleryuploadform" action="">
    <table>
    <tbody><tr><td class="field_name" vAlign="top" width="70">Image: <span class="red_highlight">*</span></td><td><input name="photo_image" type="file"><br>
    <span class="form_hint">All images must be:</span>
        <ul><li class="form_hint"> JPEG format (.jpg at the end)</li>
             <li class="form_hint"> RGB format</li>
                <li class="form_hint">Images will be resized to 1000x1000 on the longest edge (large size) for <a href="http://www.ephotozine.com/e2signup">e2 members</a> and 600x600 (normal size) for standard members</li></ul>

    </td></tr>
    <tr><td class="field_name" vAlign="top">Adult: </td><td><input name="photo_adult" value="1" type="checkbox"><br>
    <span class="form_hint">Tick if your photo contains adult material.<br>
<strong>Important:</strong> We do not accept pornographic images and reserve the right to delete such material. </span>
    </td></tr>
    <tr><td colSpan="2" align="center">
    <input name="action" value="Upload Photo" type="hidden">
    <input onclick="submitform('galleryuploadform');display_white_box('photo_upload_lightbox');closeKeepAlive();" name="button" value="Upload Photo" type="button"></td></tr>
    </tbody></table>
    </form>


    <div class="clear"></div></div>

we have submitform() which submits the form, display_white_box() which displays a dialog box message with 'uploading' and closeKeepAlive() which is a fix related to Safari on Mac. I have gone a javascript approach for submit because if i didn't the animated gif in the uploading dialog box would not animate.

As I said, I can't replicate it on any machine or any other browser.

解决方案

There is no solution. This an bug in Internet Explorer.

这篇关于在表单提交上,文件字段在Internet Explorer 9中清除的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-22 22:25
查看更多