0

Possible Duplicate:
getting access is denied error on IE8

i found some questions about trigger a <input type='file' /> to submit a form. All of this because i need a custom input file.

making some tests with this example, i found that the trigger to submit the form works if i dont put a name in the input file, this issue only happens in IE.

So, how can i submit a image with no name using a form, is this possible using jquery?

i think the solution was just to browsers !IE

Is there any other way to submit?

js:

$(".some-button").click(function() {
   $("#test").click();
})

$('#test').change(function() {
   $('#test_form').submit();
});
Community
  • 1
  • 1
Ricardo Binns
  • 3,200
  • 6
  • 39
  • 71

1 Answers1

0

http://jsfiddle.net/DSARd/241/

I was able to get it to work in IE9 by setting a delay, via setTimeout. I did not test this on other browsers, but as you have it working in other browsers then if the setTimeout doesn't help in those browsers you can always do browser sniffing (which jquery has, of course) to do the appropriate submission method.

Eli Gassert
  • 9,338
  • 3
  • 24
  • 37