> Hi All, > > I'm having a problem with the form plugin. > > When I press enter in a type="file" input field, I'm brought to a new > page instead of the current page being updated. > > In the attached code, press enter in the type="text" field, and it > works as expected, but press enter in the type="file" field, and > you're brought to a new page. > > Please let me know if I'm doing something wrong here. Oh, I almost > forgot, I'm using jquery 1.2.6 and jquery.form 2.12 > > <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" > "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> > <html xmlns="http://www.w3.org/1999/xhtml"> > <head> > <title>test</title> > <script type="text/javascript" src="/js/jquery.js"></script> > <script type="text/javascript" src="/js/jquery.form.js"></script> > <script type="text/javascript"> > $(document).ready(function() { > $("#uploadform").ajaxForm({target: '#response'});}); > > </script> > > </head> > <body> > <form id="uploadform" enctype="multipart/form-data" > action="simpleresponse.html" method="post"> > <div> > <input type="file" name="filedata"/> > </div> > <div> > <input type="text" name="textdata"/> > </div> > <div> > <input type="submit" value="ok"/> > </div> > </form> > > <div id="response"></div> > </body> > </html> > > This is all that simpleresponse.html contains > <span>I got it</span>
Interesting. IE generates an "Access is denied" error if the form is submitted with a bogus name in the file input field. But if I use the Browse button to select a valid file it works fine. Is that what you're seeing too? Mike