My experience in the past is that the browser doesn't allow you any control of <input type="file"...> since it could be easily abused. Someone could place it on the form hidden, prepopulate it with any filename and when the user clicks submit, they could get any file on the user's box.
I poked around a bit because I figured this is something that could be done in AJAX. Sure enough, there is the capabilities of doing it, scary though because what I warned about can be done... Check out this article: http://www.15seconds.com/issue/010522.htm They take and create a XML doc in javascript, import a file locally and then post the XML. ado_stream.Type = 1; // 1=adTypeBinary ado_stream.Open(); ado_stream.LoadFromFile("c:\\tmp\\myfile.doc"); // store file content into XML node l_node1.nodeTypedValue = ado_stream.Read(-1); // -1=adReadAll ado_stream.Close(); HTH? John
