I think it has something to do with the security in the browsers. I did a search on it, and found several discussion boards with people asking about that. They wanted to use an image though instead of a button to do what you are wanting to do. But noone can get it to work, they get access denied. http://www.siteexperts.com/forums/viewConverse.asp?d_id=7741&Sort=0
I tried it a few different ways on IE6, I even included a submit button to double check it, and when you click the submit button it clears the file field. The only way I was able to get it to semi-work was to set the width of the file field to 80, so it sort of hides the text part, and click on the browse button. <form action="somepage.cfm" enctype="multipart/form-data" method="post"> <INPUT TYPE="FILE" name="Foo" onchange="document.forms[0].submit()" style="width:80px"> </form> _____________________________ steve oliver senior internet developer atnet solutions, inc. http://www.atnetsolutions.com -----Original Message----- From: James Sleeman [mailto:[EMAIL PROTECTED]] Sent: Thursday, February 28, 2002 1:18 AM To: CF-Talk Subject: OT : Submit file field form via javascript Anybody know if there is a way to submit a form containing a file field via javascript whilst retaining the contents of the file field ? IE seems to (I'm presuming for security reasons) not allow this. Specifically what I want to do is... <INPUT TYPE="BUTTON" NAME="Bar" VALUE="Upload" OnClick="this.form.Foo.click()"> <INPUT TYPE="FILE" NAME="Foo" OnChange="this.form.submit()" style="display:none"> but as soon as the javascript goes to submit the form the contents of Foo get scrubbed. Ideas anybody ? ______________________________________________________________________ Get Your Own Dedicated Windows 2000 Server PIII 800 / 256 MB RAM / 40 GB HD / 20 GB MO/XFER Instant Activation � $99/Month � Free Setup http://www.pennyhost.com/redirect.cfm?adcode=coldfusionb FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/[email protected]/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

