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

后端 未结 5 787
小鲜肉
小鲜肉 2020-12-28 17:55

I got a weird error I hope you guys can help with.

Sometimes when the user tries to submit a form the file upload field image just clears and nothing h

相关标签:
5条回答
  • There is no clever workarounds for this, IE9 does not allow a file to be tampered with via JavaScript probably for security reasons.

    0 讨论(0)
  • 2020-12-28 18:33

    There should be only 1 submit button per form. So keep 1 save button as type="submit" ,change another to type="button"

    0 讨论(0)
  • 2020-12-28 18:36

    First of all, pls let us see your php coding to send this form.... Usually form submission errors such as this have server-side coding errors.. Maybe you should check out your PHP coding and see what happens in your

     $_POST['save'] 
    

    area....

    Hope this helps... :)

    0 讨论(0)
  • 2020-12-28 18:39

    you should use:

    <input type="button" onclick="customFunction" />
    

    write what you want to do in customFunction(javascript)

    0 讨论(0)
  • 2020-12-28 18:40

    Try using input instead of button, good luck!

    ex

    <input type="submit" name="mysubmit" value="Click!" />
    
    0 讨论(0)
提交回复
热议问题